Implement HTTP header filtering

Background

adblockpluscore#77 implements the filter option $header to allow URL blocking filters to match on http response headers.

What to change

  • update the dependency on adblockpluscore to the proper revision (56d14b7) - see #312 (closed)
  • Implement the blocking in a onHeadersReceived listener lib/requestBlocking.js. Filters should be queried with defaultMatcher.search() and request blocking should check for WhitelistFilter first and then blocking filter. See details in adblockpluscore#77 on the expected blocking filters.

Note

It is possible that this be rendered impractical in manifest v3, however having this for other browsers is worth it.

Consideration

Since we are likely to call the matcher for most requests, performance is important.

Hints for testers

TBD

Edited by Hubert Figuière