@@ -2,6 +2,7 @@ package edgetts
22
33import (
44 "encoding/json"
5+ "fmt"
56 "github.com/lib-x/edgetts/internal/businessConsts"
67 "net/http"
78 "sync"
@@ -62,9 +63,15 @@ func makeVoiceListRequestHeader() http.Header {
6263 header .Set ("Content-Type" , "application/json" )
6364 header .Set ("Accept" , "*/*" )
6465 header .Set ("Authority" , "speech.platform.bing.com" )
65- header .Set ("Sec-CH-UA" , `" Not;A Brand";v="99", "Microsoft Edge";v="91", "Chromium";v="91"` )
66+ header .Set ("Sec-CH-UA" , fmt .Sprintf (`" Not;A Brand";v="99", "Microsoft Edge";v="%s", "Chromium";v="%s"` ,
67+ businessConsts .ChromiumMajorVersion ,
68+ businessConsts .ChromiumMajorVersion ,
69+ ))
6670 header .Set ("Sec-CH-UA-Mobile" , "?0" )
67- header .Set ("User-Agent" , "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36(KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" )
71+ header .Set ("User-Agent" , fmt .Sprintf ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s.0.0.0 Safari/537.36 Edg/%s.0.0.0" ,
72+ businessConsts .ChromiumMajorVersion ,
73+ businessConsts .ChromiumMajorVersion ,
74+ ))
6875 header .Set ("Sec-Fetch-Site" , "none" )
6976 header .Set ("Sec-Fetch-Mode" , "cors" )
7077 header .Set ("Sec-Fetch-Dest" , "empty" )
0 commit comments