-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
Prerequisites
- I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
- This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
- This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
- I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
- The issue is not present after disabling uBO in the browser.
- I checked the documentation to understand that the issue I am reporting is not normal behavior.
I tried to reproduce the issue when...
- uBO is the only extension.
- uBO uses default lists and settings.
- using a new, unmodified browser profile.
Description
We need to expand syntax of prevent-xhr, prevent-fetch, trusted-prevent-fetch and trusted-prevent-xhr scriptlet by allowing specifying HTTP status code and modifying an HTTP header for XHR and fetch API.
For example, by executing the following code without adblocking, you can receive 0 as its HTTP status code:
(await fetch('https://www3.doubleclick.net', { method: 'HEAD', mode: 'no-cors', cache: 'no-store' })).statusHowever, the following none of scriptlet filters work:
example.com##+js(no-fetch-if, doubleclick.net, , '{"statusText": ""}')
example.com##+js(no-fetch-if, doubleclick.net, , '{"type": "opaque"}')
example.com##+js(no-fetch-if, doubleclick.net)because uBO returns 200.
Also, removing, modifying and adding an HTTP response header & its value is required.
A specific URL where the issue occurs.
https://srank.kr/Steps to Reproduce
- Apply each the provided scriptlet filter
- Visit https://example.com/
- Execute the provided code.
Expected behavior
Return 0.
Actual behavior
Return 200.
uBO version
1.66.4
Browser name and version
Firefox Dev 144.0b9 flatpak
Operating System and version
Ubuntu 25.10
Metadata
Metadata
Assignees
Labels
No labels