Skip to content

Refactor to use upcoming Django 6.0 CSP support - #550

Open
Chiemezuo wants to merge 6 commits into
wagtail:mainfrom
Chiemezuo:refactor/inbuilt-django-csp
Open

Refactor to use upcoming Django 6.0 CSP support#550
Chiemezuo wants to merge 6 commits into
wagtail:mainfrom
Chiemezuo:refactor/inbuilt-django-csp

Conversation

@Chiemezuo

@Chiemezuo Chiemezuo commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

Fixes #532

In December, Django 6.0 is expected to be released.

One of the biggest features will be the built-in CSP support. This means that projects that previously used external CSP packages like django-csp will no longer need to rely on external tooling. CSP will be supported out-of-the-box 🎊

I've tested this tool, and I feel confident that we can replace our usage of django-csp with it. However, as Django 6.0 is not yet available, we cannot remove usage of django-csp.

This PR adds support for the coming Django 6.0 release, while keeping the existing django-csp functionality.

They will both be interchangeable, depending on whether it's a compatible Django version or not.

@Stormheg Stormheg changed the title Refactor/inbuilt django csp Refactor to use upcoming Django 6.0 CSP support Aug 27, 2025
@Stormheg
Stormheg marked this pull request as draft August 27, 2025 21:31
@Chiemezuo
Chiemezuo marked this pull request as ready for review August 28, 2025 05:53
@vossisboss

Copy link
Copy Markdown
Collaborator

@Chiemezuo We are running Django 6.0 now. Could you please take another look at this and make updates and test it out? Once you do, I'll do a review and we can close this out.

@vossisboss vossisboss added the needs-updating For PRs that need additional updates. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-updating For PRs that need additional updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor CSP configuration from django-csp to Django 6.0 core support

2 participants