mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Avoid opening blobs as webpages
Fixes #10060
(cherry picked from commit 548f7f415a)
			
			
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user