Fixed a bug that bypassses iframes in frontends pages https://github.com/libredirect/browser_extension/issues/866
This commit is contained in:
parent
dbd0bbb03e
commit
e48f68126d
|
@ -104,7 +104,10 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
|
||||||
initiator
|
initiator
|
||||||
&&
|
&&
|
||||||
instanceList.includes(initiator.origin)
|
instanceList.includes(initiator.origin)
|
||||||
) return "BYPASSTAB"
|
) {
|
||||||
|
if (type != "main_frame") return null
|
||||||
|
else return "BYPASSTAB"
|
||||||
|
}
|
||||||
|
|
||||||
randomInstance = utils.getRandomInstance(instanceList)
|
randomInstance = utils.getRandomInstance(instanceList)
|
||||||
if (config.services[service].frontends[frontend].localhost && options[service].instance == "localhost") {
|
if (config.services[service].frontends[frontend].localhost && options[service].instance == "localhost") {
|
||||||
|
|
|
@ -71,7 +71,7 @@ browser.webRequest.onBeforeRequest.addListener(
|
||||||
if (tabIdRedirects[details.tabId] != false) tabIdRedirects[details.tabId] = false
|
if (tabIdRedirects[details.tabId] != false) tabIdRedirects[details.tabId] = false
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
console.info("Redirecting", url.href, "=>", newUrl)
|
console.log("Redirecting", url.href, "=>", newUrl)
|
||||||
return { redirectUrl: newUrl }
|
return { redirectUrl: newUrl }
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
|
Loading…
Reference in New Issue