Skip to content

➕(back) install and configure django csp #1085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

lunika
Copy link
Member

@lunika lunika commented Jun 19, 2025

Purpose

We want to protect all requests from django with c content security policy header. We use the djang-csp library and configure it with default values.

Proposal

  • ➕(back) install and configure django csp

Fixes #1000

We want to protect all requests from django with c content security
policy header. We use the djang-csp library and configure it with
default values.
@lunika lunika requested a review from AntoLC June 19, 2025 15:30
@lunika lunika self-assigned this Jun 19, 2025
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

Do we still need that so ?

"Content-Security-Policy": "default-src 'none'; img-src 'none' data:;",

add_header Content-Security-Policy "default-src 'none'" always;

@lunika
Copy link
Member Author

lunika commented Jun 20, 2025

In NGINX yes because the response does not come from django but minio.
For the other I will take a look.

@lunika lunika requested a review from qbey June 20, 2025 09:07
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.

Install and configure library django-csp
2 participants