uBlock/platform
Raymond Hill 408b538e75
[mv3] Add support to convert header= option to DNR rules
Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/157

The `header=` option will be converted into DNR's `responseHeaders`
condition.

There will be an attempt to convert regex-based values into DNR-
compatible syntax. Not all regex-based patterns can be converted to
use DNR's patterns with `*` and `?` special characters.

The implementation of `header=` option in uBO has been revisited to
improve compatibility with DNR syntax to minimize burden for list
maintainers when creating `header=` filters compatible with both
uBO and uBOL.

The changes:
- Header names are now case-insensitive by default
- Occurrences of `*` in non-regex-based header values now mean
  "matches any number of characters"
- Occurrences of `?` in non-regex-based header values now mean
  "matches zero or one character"

At time of commit, and as per MDN, only Chromium-based browsers
currently support filtering on repsonse headers:
https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/HeaderInfo

Also as per MDN, Chromium 121-127 silently ignore the `responseHeaders`
condition, potentially causing undue blocking of network requests.
Currently uBOL support Chromium 122 and later, meaning we need to mind
potential false positives in Chromium 122-127 for filters using
`header=` option.
2025-05-22 11:46:08 -04:00
..
chromium Ignore start_page transition for popup-blocking purpose 2025-04-23 09:34:00 -04:00
common Use Object.hasOwn instead of Object.prototype.hasOwnProperty 2025-03-24 08:15:09 -04:00
dig Better integrate latest eslint version 2025-01-10 10:25:15 -05:00
firefox Add path support as target option in static extended filtering 2025-04-08 11:20:27 -04:00
mv3 [mv3] Add support to convert header= option to DNR rules 2025-05-22 11:46:08 -04:00
nodejs Better integrate latest eslint version 2025-01-10 10:25:15 -05:00
npm Better integrate latest eslint version 2025-01-10 10:25:15 -05:00
opera [mv3] Convert domain= to to= for csp=/permissions= options 2025-03-03 11:45:54 -05:00
safari Clarify that the code base was really old and obsolete 2019-09-22 09:57:38 -04:00
thunderbird Remove letsblock.it as target for subscribe.js content script 2024-04-03 10:51:39 -04:00