CSP: `defaultSrc` should not be required
See original GitHub issueThe new CSP module says it is a lot less restrictive on policy definition, but it added some new restrictions.
defaultSrc now apparently required, though if you follow guidelines like Google’s strict CSP, it is not necessary. https://csp.withgoogle.com/docs/strict-csp.html
If you read the specifications for V2 https://www.w3.org/TR/CSP2/ and V3 https://www.w3.org/TR/CSP3/ there is no mention that default-src is required.
But with the latest Helmet, now I must define a default even if I don’t want to use it. Without it I get "Content-Security-Policy needs a default-src but none was provided"
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (13 by maintainers)
Top Results From Across the Web
CSP: default-src - HTTP - MDN Web Docs
The HTTP Content-Security-Policy (CSP) default-src directive serves as a fallback for the other CSP fetch directives. For each of the ...
Read more >default-src Directive - Content Security Policy
The default-src Content Security Policy (CSP) directive allows you to specify the default or fallback resources that can be loaded (or fetched) on...
Read more >Content-Security-Policy: default-src * - Stack Overflow
It seems to me that the asterisk can only be used for host sources. Yes. But what else can I do since only...
Read more >Using Content Security Policy (CSP) to Secure Web Applications
default -src is a fallback directive used to specify the default content policy for most of the source directives. Common uses include default- ......
Read more >Content security policy - web.dev
Even though https: is specified in default-src , the script and style directives don't automatically inherit that source. Each directive ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has been released in
helmet@4.3.0
. Here’s how you disabledefault-src
:Makes sense. I’ll move forward with that pull request.