Skip to content
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

Gracefully returning DNR for unsupported redirect resources #23

Open
seia-soto opened this issue Oct 30, 2024 · 1 comment
Open

Gracefully returning DNR for unsupported redirect resources #23

seia-soto opened this issue Oct 30, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@seia-soto
Copy link
Member

seia-soto commented Oct 30, 2024

Currently, AdGuard converter doesn't allow using unlisted redirect resource in $redirect filters. outbrain-widget.js is supported by uBlock Origin but it's not listed in their supported redirect names: https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-redirects.md#redirect-resources

As a result, the converter throws an error:

DNR: Error during creating indexed rule with hash: Cannot create IRule from filter "0" and line "1": "$redirect modifier is invalid" in the rule: "||widgets.outbrain.com/outbrain.js^$domain=allocine.fr,redirect=outbrain-widget.js"

Gracefully returning value would be preferred in these kinds of situations.

One possible idea is, we can replace a value of $redirect to noopjs temporarily then rollback after the conversion.

@seia-soto seia-soto added the enhancement New feature or request label Oct 30, 2024
@seia-soto seia-soto self-assigned this Oct 30, 2024
@seia-soto seia-soto changed the title Graceful return for unsupported redirect resources Gracefully returning DNR for unsupported redirect resources Oct 30, 2024
@seia-soto
Copy link
Member Author

Also, if we're going to ship our own resource surrogates in the future, this is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant