-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redirect-rule doesn't work when blank pattern (asterisk) is omitted #977
Comments
Ugh, looks like missed this in the documentation. It were mentioned for normal redirect instead of redirect-rule. Not sure why is it like this, though. Why is it not optional? |
By-design. You need to add |
Just the way the feature evolved over time. I can internally map the empty pattern to |
Related issue: - uBlockOrigin/uBlock-issues#977 No pattern will imply `*` for the redirect destination part of the rule.
Please add this fact to the documentation. This GitHub page is the only place where this fact is written down. |
@szakib That's no longer necessary - gorhill/uBlock@cb5437b |
Prerequisites
Description
According to logger blocked URLs are not redirected in case redirect rule with blank pattern is present, but starts with
$
instead of*$
. Normal blocking rules with omitted blank pattern work fine since asterisk is optional in such case. Not for redirect rules, though.A specific URL where the issue occurs
https://www.reddit.com/
Steps to Reproduce
$script,redirect-rule=noopjs,domain=reddit.com
$script,domain=reddit.com
*$script,redirect-rule=noopjs,domain=reddit.com
Note extra asterisk at start.
Expected behavior:
In both cases all blocked scripts redirected to noop.js and that is visible in the log.
Actual behavior:
Only in second case (step 5) blocked scripts are redirected to noop.js and appear in the log.
Your environment
The text was updated successfully, but these errors were encountered: