diff --git a/src/js/redirect-engine.js b/src/js/redirect-engine.js index 9ca363dd1..37a66a241 100644 --- a/src/js/redirect-engine.js +++ b/src/js/redirect-engine.js @@ -70,6 +70,14 @@ var warResolve = (function() { }; })(); +// https://github.com/gorhill/uBlock/issues/3639 +// https://github.com/EFForg/https-everywhere/issues/14961 +// https://bugs.chromium.org/p/chromium/issues/detail?id=111700 +// Do not redirect to a WAR if the platform suffers from spurious redirect +// conflicts, and the request to redirect is not `https:`. +// This special handling code can removed once the Chromium issue is fixed. +var suffersSpuriousRedirectConflicts = vAPI.webextFlavor.soup.has('chromium'); + /******************************************************************************/ /******************************************************************************/ @@ -91,7 +99,11 @@ RedirectEntry.prototype.toURL = function(details) { if ( this.warURL !== undefined && details instanceof Object && - details.requestType !== 'xmlhttprequest' + details.requestType !== 'xmlhttprequest' && + ( + suffersSpuriousRedirectConflicts === false || + details.requestURL.startsWith('https:') + ) ) { return this.warURL + '?secret=' + vAPI.warSecret; }