We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65ca612 commit 16f8856Copy full SHA for 16f8856
1 file changed
src/bg/RequestGuard.js
@@ -533,7 +533,11 @@ var RequestGuard = (() => {
533
let filterAll = {urls: allUrls};
534
listen("onBeforeRequest", filterAll, ["blocking"]);
535
536
- const mergingCSP = parseInt(navigator.userAgent.replace(/.*Firefox\/(\d+).*/, "$1")) >= 77;
+ let mergingCSP = "getBrowserInfo" in browser.runtime;
537
+ if (mergingCSP) {
538
+ let {vendor, version} = await browser.runtime.getBrowserInfo();
539
+ mergingCSP = vendor === "Mozilla" && parseInt(version) >= 77;
540
+ }
541
if (mergingCSP) {
542
// In Gecko>=77 (https://bugzilla.mozilla.org/show_bug.cgi?id=1462989)
543
// we need to cleanup our own cached headers in a dedicated listener :(
0 commit comments