fix: Avoid blob in webview (#1179)

This commit is contained in:
LuftVerbot 2023-10-28 10:43:42 +02:00 committed by GitHub
parent 6f372f34c7
commit 509ecedb3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,12 @@ fun WebViewScreenContent(
request: WebResourceRequest?,
): Boolean {
request?.let {
// Don't attempt to open blobs as webpages
if (it.url.toString().startsWith("blob:http")) {
return false
}
// Continue with request, but with custom headers
view?.loadUrl(it.url.toString(), headers)
}
return super.shouldOverrideUrlLoading(view, request)