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

# Conflicts:
#	yarn.lock
This commit is contained in:
beyondkmp 2025-09-05 13:49:55 +08:00 committed by kangfenmao
parent ba7eec64b0
commit 6f9906fe49

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 })
})