On chromium, extraHeaders permission is needed for sanitization #442

Closed
opened 5 months ago by kavin · 1 comments
kavin commented 5 months ago

Please note the following tips

  • Is there already an existing issue? (Search for the URL, e.g. "codeberg.org" or "localcdn.org")

No

I did a code review to find this issue

If none of the points apply

## Please note the following tips * Is there already an existing issue? (Search for the URL, e.g. "codeberg.org" or "localcdn.org") No * For the most common problems and solutions I have created an online tool. Please test the broken website there: https://www.localcdn.org/test/check I did a code review to find this issue ### If none of the points apply * Without the `extraHeaders` permission, on chromium, the Origin and Referer header are not exposed. * If the permission is added on Firefox, it will fail to register the listener. * The relevant code is at https://codeberg.org/nobody/LocalCDN/src/branch/main/core/request-sanitizer.js#L28-L44
nobody added the
bug
label 5 months ago
nobody added this to the v2.6.7 milestone 5 months ago
Owner

Thanks for the information 👍

Annoying that Chromium has to do something different here again. Anyway, I added a small switch that loads a different extraInfoSpec array for all non-Firefox browsers.

Note: Specifying 'extraHeaders' in opt_extraInfoSpec may have a negative impact on performance, hence it should only be used when really necessary.

https://developer.chrome.com/docs/extensions/reference/webRequest/

Thanks for the information 👍 Annoying that Chromium has to do something different here again. Anyway, I added a small switch that loads a different extraInfoSpec array for all non-Firefox browsers. > Note: Specifying 'extraHeaders' in opt_extraInfoSpec may have a negative impact on performance, hence it should only be used when really necessary. > > https://developer.chrome.com/docs/extensions/reference/webRequest/
nobody closed this issue 5 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.