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

Allow resources surrogates #4393

Closed
seia-soto opened this issue Oct 26, 2024 · 1 comment · Fixed by #4394
Closed

Allow resources surrogates #4393

seia-soto opened this issue Oct 26, 2024 · 1 comment · Fixed by #4394
Assignees
Labels

Comments

@seia-soto
Copy link
Member

seia-soto commented Oct 26, 2024

This issue was separated from #4392.

Since v1.34, it's not possible to use JavaScript redirect resources as scriptlets. We completely separated those two things to make things clear.

We should able to use redirect resources which content type is "application/javascript" as scriptlets. The restriction applies: you need to omit .js suffix (or file extension)

@seia-soto
Copy link
Member Author

From investigations, it looks like not all the scriptlets are available as resources. Rather, they tend to be limited to ones with .js suffix on https://github.com/gorhill/uBlock/wiki/Resources-Library#available-url-specific-sanitized-redirect-resources-surrogates . This was happened because I confused the sentence.

seia-soto added a commit to seia-soto/adblocker that referenced this issue Oct 28, 2024
refs https://github.com/gorhill/uBlock/wiki/Resources-Library
refs ghostery#4392
fixes ghostery#4393

test: allow scriptlets being used as resources

fix: allow redirect resources surrogates

test: drop outdated tests

fix: always query with file extension

chore: strictly check content type

test: resources surrogate

test: drop outdated
@seia-soto seia-soto changed the title Allow scriptlets being used as resources Allow resources surrogates Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant