uBlock/platform
Raymond Hill 2e4525fe3c
Add new static network filter option: `urltransform`
The `urltransform` option allows to redirect a non-blocked network
request to another URL. There are restrictions on its usage:

- require a trusted source -- thus uBO-maintained lists or user
  filters
- the `urltransform` value must start with a `/`

If at least one of these conditions is not fulfilled, the filter
will be invalid and rejected.

The requirement to start with `/` is to enforce that only the path
part of a URL can be modified, thus ensuring the network request
is redirected to the same scheme and authority (as defined at
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax).

Usage example (redirect requests for CSS resources to a non-existing
resource, for demonstration purpose):

    ||iana.org^$css,urltransform=/notfound.css

Name of this option is inspired from DNR API:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/URLTransform

This commit required to bring the concept of "trusted source" to
the static network filtering engine.
2023-10-16 09:47:29 -04:00
..
browser
chromium
common
dig
firefox Modify `manifest.json` for other platforms 2023-10-14 13:55:46 -04:00
mv3 Add new static network filter option: `urltransform` 2023-10-16 09:47:29 -04:00
nodejs
npm
opera Modify `manifest.json` for other platforms 2023-10-14 13:55:46 -04:00
safari
thunderbird Modify `manifest.json` for other platforms 2023-10-14 13:55:46 -04:00