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

Implement strict-dynamic alongside URL allowlists #350

Closed
akashdotsrivastava opened this issue Aug 20, 2017 · 2 comments
Closed

Implement strict-dynamic alongside URL allowlists #350

akashdotsrivastava opened this issue Aug 20, 2017 · 2 comments

Comments

@akashdotsrivastava
Copy link

Feature Requests

Adding a new CSP directive

Now I'm not sure if it's a new directive

I'm talking about implementing strict-dynamic in script_src alongside a list of known URLs.
Basically using nonce-specified inline scripts from my own views, alongside few URLs like jsdelivr

Of course using strict-dynamic blocks all external scripts.

https://csp.withgoogle.com/docs/faq.html#strict-dynamic-with-whitelists suggests a way to do that, specifying two csp headers.

Not sure how I'd replicate that in the initializer I use for SecureHeaders config.
Needless to say, setting scripts_src twice inside csp, generates a duplicate key warning

@oreoshake
Copy link
Contributor

oreoshake commented Aug 21, 2017

This is related to #323.

A hacky workaround is to supply , script-src as one of your values. This has the same effect as setting two headers. See https://twitter.com/mikewest/status/841892857736765443 for discussion on this.

@oreoshake oreoshake changed the title Implement strict-dynamic alongside URL whitelists Implement strict-dynamic alongside URL allowlists May 6, 2021
@oreoshake
Copy link
Contributor

I believe this has been resolved with strict-dynamic support

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

No branches or pull requests

2 participants