Fixed a bug that bypassses iframes in frontends pages https://github.com/libredirect/browser_extension/issues/866

This commit is contained in:
ManeraKai 2023-12-12 14:42:45 +03:00
parent dbd0bbb03e
commit e48f68126d
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
2 changed files with 6 additions and 3 deletions

View File

@ -104,7 +104,10 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
initiator
&&
instanceList.includes(initiator.origin)
) return "BYPASSTAB"
) {
if (type != "main_frame") return null
else return "BYPASSTAB"
}
randomInstance = utils.getRandomInstance(instanceList)
if (config.services[service].frontends[frontend].localhost && options[service].instance == "localhost") {

View File

@ -71,7 +71,7 @@ browser.webRequest.onBeforeRequest.addListener(
if (tabIdRedirects[details.tabId] != false) tabIdRedirects[details.tabId] = false
return null
}
console.info("Redirecting", url.href, "=>", newUrl)
console.log("Redirecting", url.href, "=>", newUrl)
return { redirectUrl: newUrl }
}
return null