Skip to content

Commit

Permalink
Fix urlskip= with -blocked directive for blocked requests
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Oct 28, 2024
1 parent ac45060 commit c07db75
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/js/pagestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -925,8 +925,11 @@ const PageStore = class {
}

redirectBlockedRequest(fctxt) {
const directives = staticNetFilteringEngine.redirectRequest(redirectEngine, fctxt);
if ( directives === undefined ) { return; }
const directives = staticNetFilteringEngine.redirectRequest(redirectEngine, fctxt) || [];
if ( this.urlSkippableResources.has(fctxt.itype) ) {
staticNetFilteringEngine.urlSkip(fctxt, true, directives);
}
if ( directives.length === 0 ) { return; }
if ( logger.enabled !== true ) { return; }
fctxt.pushFilters(directives.map(a => a.logData()));
if ( fctxt.redirectURL === undefined ) { return; }
Expand Down Expand Up @@ -1152,6 +1155,7 @@ const PageStore = class {
µb.FilteringContext.MAIN_FRAME,
µb.FilteringContext.MEDIA,
µb.FilteringContext.OBJECT,
µb.FilteringContext.OTHER,
µb.FilteringContext.SUB_FRAME,
]);

Expand Down

0 comments on commit c07db75

Please sign in to comment.