fix: purify minapp user agent tag (#5173)
This commit is contained in:
parent
fd09edc2b9
commit
eb89c6ea21
@ -60,6 +60,9 @@ const WebviewContainer = memo(
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [appid, url])
|
}, [appid, url])
|
||||||
|
|
||||||
|
//remove the tag of CherryStudio and Electron
|
||||||
|
const userAgent = navigator.userAgent.replace(/CherryStudio\/\S+\s/, '').replace(/Electron\/\S+\s/, '')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<webview
|
<webview
|
||||||
key={appid}
|
key={appid}
|
||||||
@ -67,6 +70,7 @@ const WebviewContainer = memo(
|
|||||||
style={WebviewStyle}
|
style={WebviewStyle}
|
||||||
allowpopups={'true' as any}
|
allowpopups={'true' as any}
|
||||||
partition="persist:webview"
|
partition="persist:webview"
|
||||||
|
useragent={userAgent}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user