移除https错误忽略
This commit is contained in:
@@ -129,19 +129,6 @@ fun WebViewDisplay(modifier: Modifier = Modifier, url: String) {
|
||||
AndroidView(
|
||||
factory = { context ->
|
||||
WebView(context).apply {
|
||||
webViewClient = object : WebViewClient() {
|
||||
override fun onReceivedSslError(
|
||||
view: WebView?,
|
||||
handler: SslErrorHandler?,
|
||||
error: SslError?
|
||||
) {
|
||||
handler?.proceed() // 忽略证书错误
|
||||
}
|
||||
}
|
||||
settings.apply {
|
||||
domStorageEnabled = true
|
||||
mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
|
||||
}
|
||||
loadUrl(url)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user