Skip to content

Conversation

robhudson
Copy link
Collaborator

The middleware was originally added to support Django Debug Toolbar by forcing nonce headers even when not used in content. This is no longer needed since Debug Toolbar now handles this properly with CheckableLazyObject.

It is recommended to only include a nonce in the header if it is used in the content and as such this removal helps the user follow good security practices.

Copy link
Contributor

@stevejalim stevejalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense - nice cleanup! r+

@jwhitlock jwhitlock merged commit 395d928 into main Mar 18, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

3 participants