Fixed bypass of redirect to original not working in chromium https://github.com/libredirect/browser_extension/issues/1001

This commit is contained in:
ManeraKai 2024-11-02 21:57:12 +03:00
parent be15b9868d
commit ee1cb15796
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337

View File

@ -53,6 +53,7 @@ browser.webRequest.onBeforeRequest.addListener(
let documentUrl let documentUrl
try { try {
if (details.originUrl) originUrl = new URL(details.originUrl) if (details.originUrl) originUrl = new URL(details.originUrl)
else if (details.initiator) originUrl = new URL(details.initiator)
if (details.documentUrl) documentUrl = new URL(details.documentUrl) if (details.documentUrl) documentUrl = new URL(details.documentUrl)
} catch { } catch {
return null return null