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

feat: allow overriding http headers #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mnlkrs
Copy link

@mnlkrs mnlkrs commented Jun 21, 2023

While integrating this repository I came across an CSP error trying to create a service worker:

Failed to construct 'Worker': Access to the script at 'blob:https://foo.bar/f857a673-313d-42d9-965b-bfc803440b1e' is denied by the document's Content Security Policy.

I couldn't really find a way to override the headers, so here I am with the pull request!

Let me know if you want anything changed.

@IchBinYangF
Copy link

IchBinYangF commented Aug 9, 2023

Met the same CSP problem with img loading from another distribution, need to override the http header of CSP.
(restriction of Combining CloudFront Functions with Lambda@Edge with Viewer request with Lambda@Edge and viewer respond with CloudFront Functions not possible https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions-restrictions.html)
so this can't be solved by adding add cloudfront function (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/example-function-add-security-headers.html)
I really need this PR. @mnlkrs 👍

@mnlkrs
Copy link
Author

mnlkrs commented Aug 14, 2024

Hi @henrist , this is still something I'm interested in - another use-case is simply loading google fonts, which would be blocked with the default, non-overwritable CSP.

@mnlkrs mnlkrs force-pushed the feature/override_http_headers branch from fc1b044 to 0e0e3d6 Compare August 14, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants