-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Description
Context
After updating to 4.0b2
, configuration values stored as tuple
are silently ignored.
We use a security scanner (zap) which had started failing due to missing CSP headers. The docs mention that Many settings require a tuple or list. You may get very strange policies and even errors when mistakenly configuring them as a string.
After migrating to 4.0-compatible configuration, all of our values were tuple
- changing them to list
caused the header to appear again (this commit)
Suggestions
- It'd be nice if incorrect configuration failed explicitly, rather than effectively skipping CSP. It's hard to notice the missing CSP header without a scanner, and it was difficult to debug why it wasn't being added. This was also how we noticed we needed to change our config for 4.0 - the security scanner caught it; our app ran without exception.
- Re-support tuple or drop support for it from the documentation. All examples and tests appear to expect lists, anyway 🤷
This is low priority for us personally since we've figured it out and made the change, but I figured I'd bring this to your attention since it can silently disable CSP for config that conforms to the docs 😅
Metadata
Metadata
Assignees
Labels
No labels