Fix WebView user-agent (fixes #7306)
The `source.headers.toMultimap()` call in WebViewActivity makes all the names lowercase.
This commit is contained in:
parent
a446b37c1f
commit
284880d096
@ -44,7 +44,7 @@ fun WebViewScreen(
|
|||||||
onClearCookies: (String) -> Unit,
|
onClearCookies: (String) -> Unit,
|
||||||
) {
|
) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val state = rememberWebViewState(url = url)
|
val state = rememberWebViewState(url = url, additionalHttpHeaders = headers)
|
||||||
val navigator = rememberWebViewNavigator()
|
val navigator = rememberWebViewNavigator()
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
@ -144,7 +144,7 @@ fun WebViewScreen(
|
|||||||
WebView.setWebContentsDebuggingEnabled(true)
|
WebView.setWebContentsDebuggingEnabled(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
headers["User-Agent"]?.let {
|
headers["user-agent"]?.let {
|
||||||
webView.settings.userAgentString = it
|
webView.settings.userAgentString = it
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user