fix: update User-Agent handling in WebviewService to conditionally set based on URL (#9931)

This commit is contained in:
beyondkmp
2025-09-05 13:49:55 +08:00
committed by GitHub
parent 96d41ae8f6
commit a58b58cd95
2 changed files with 2 additions and 57 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ export function initSessionUserAgent() {
wvSession.webRequest.onBeforeSendHeaders((details, cb) => {
const headers = {
...details.requestHeaders,
'User-Agent': newUA
'User-Agent': details.url.includes('google.com') ? originUA : newUA
}
cb({ requestHeaders: headers })
})