mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-02 18:39:06 +08:00
fix: update User-Agent handling in WebviewService to conditionally set based on URL (#9931)
# Conflicts: # yarn.lock
This commit is contained in:
parent
ba7eec64b0
commit
6f9906fe49
@ -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 })
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user