mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
Prevent redirecting when URL is not transformed
Related commit: https://github.com/gorhill/uBlock/commit/2e4525fe3c
This commit is contained in:
parent
8b107e1bac
commit
c06f5e014f
1 changed files with 1 additions and 0 deletions
|
@ -5270,6 +5270,7 @@ FilterContainer.prototype.transformRequest = function(fctxt) {
|
|||
const directive = directives[directives.length-1];
|
||||
if ( (directive.bits & AllowAction) !== 0 ) { return directives; }
|
||||
const redirectURL = new URL(fctxt.url);
|
||||
if ( directive.value === redirectURL.pathname ) { return; }
|
||||
redirectURL.pathname = directive.value;
|
||||
fctxt.redirectURL = redirectURL.href;
|
||||
return directives;
|
||||
|
|
Loading…
Reference in a new issue