mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-03 23:58:55 +01:00 
			
		
		
		
	Fix WebView user-agent (fixes #7306)
The `source.headers.toMultimap()` call in WebViewActivity makes all the names lowercase.
This commit is contained in:
		@@ -44,7 +44,7 @@ fun WebViewScreen(
 | 
			
		||||
    onClearCookies: (String) -> Unit,
 | 
			
		||||
) {
 | 
			
		||||
    val context = LocalContext.current
 | 
			
		||||
    val state = rememberWebViewState(url = url)
 | 
			
		||||
    val state = rememberWebViewState(url = url, additionalHttpHeaders = headers)
 | 
			
		||||
    val navigator = rememberWebViewNavigator()
 | 
			
		||||
 | 
			
		||||
    Column {
 | 
			
		||||
@@ -144,7 +144,7 @@ fun WebViewScreen(
 | 
			
		||||
                        WebView.setWebContentsDebuggingEnabled(true)
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    headers["User-Agent"]?.let {
 | 
			
		||||
                    headers["user-agent"]?.let {
 | 
			
		||||
                        webView.settings.userAgentString = it
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user