Skip to content

Commit

Permalink
Adblocker: apply whitelisting to push injections
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod committed Oct 25, 2023
1 parent 31a33b5 commit b465995
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/adblocker/sources/adblocker.es
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ export default class Adblocker {
return skip('trusted page');
}

// Make sure request is not whitelisted (applies on request context)
if (this.whitelistChecks.length !== 0) {
for (let i = 0; i < this.whitelistChecks.length; i += 1) {
if (this.whitelistChecks[i](details) === true) {
return false;
}
}
}

return true;
}

Expand Down

0 comments on commit b465995

Please sign in to comment.