fix(deps): update dependency django-csp to v4 #72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/django-csp-4.x-lockfile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
3.8
->4.0
Release Notes
mozilla/django-csp (django-csp)
v4.0
Compare Source
===
This release contains several breaking changes. For a complete migration guide, see:
https://django-csp.readthedocs.io/en/latest/migration-guide.html
Breaking Changes
Configuration Format: Moved to dict-based configuration which allows for setting policies for
both enforced and report-only. Instead of using individual settings with
CSP_
prefixes, you nowuse dictionaries called
CONTENT_SECURITY_POLICY
and/orCONTENT_SECURITY_POLICY_REPORT_ONLY
.(#219)
You can use Django's check command to automatically identify existing CSP settings and generate a
template for the new configuration format:
This will detect your old
CSP_
prefixed settings and output a draft of the new dict-basedconfiguration, giving you a starting point for migration.
Example:
Change from:
to:
Nonce Configuration: Switched from specifying directives that should contain nonces as a
separate list to using a sentinel
NONCE
value in the directive itself.(#223)
Example:
Change from:
to:
Nonce Behavior: Changed how
request.csp_nonce
works - it is now Falsy(
bool(request.csp_nonce)
) until it is read as a string (e.g., used in a template or withstr(request.csp_nonce)
). Previously, it always tested asTrue
, and testing generated the nonce.(#270)
Before:
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.