{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/5"}],"enrichment":{"capability":"Django-CSP adds Content-Security-Policy headers to Django applications, enabling you to define and enforce browser security policies that control which resources can be loaded.","skillfed_tags":["security-headers","django-middleware"],"use_cases":["Prevent XSS attacks by restricting script execution to trusted origins only.","Enforce HTTPS for all resources to block mixed-content vulnerabilities.","Report policy violations to a logging endpoint for security monitoring.","Gradually roll out stricter policies using report-only mode before enforcement.","Isolate third-party widget code by restricting its access to the page DOM."],"what_it_does":"Django-CSP is a middleware package that automatically injects Content-Security-Policy headers into Django HTTP responses. It lets you define a security policy that tells browsers which origins are allowed to load scripts, stylesheets, images, and other resources, helping prevent cross-site scripting (XSS) and other injection attacks. The package wraps around Django and works with the packaging library to manage policy directives.\n\nYou configure policies in Django settings and the middleware applies them to all responses. It supports both report-only mode (for testing policies without enforcing them) and enforcement mode, and integrates cleanly into the Django request/response cycle without requiring changes to your views or templates.","worth_installing":"Yes. Django-CSP is a stable, low-friction way to add a critical security layer to Django applications. It has no known vulnerabilities, permissive licensing, and broad Django version support. The aging maintenance status is not a blocker\u2014the package is mature and the 499-day release gap may reflect stability rather than abandonment. Install it if you need CSP header management in Django."},"id":"django-csp","links":{"html":"https://skillfed.io/packages/django-csp","md":"https://skillfed.io/packages/django-csp.md","pypi":"https://pypi.org/project/django-csp/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-04-02","license_spdx":null,"license_treatment":"permissive","name":"django-csp","python_support":"unspecified","summary":"Django Content Security Policy support."},"popularity":{"monthly_downloads":3988500,"position":2408,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"4.0"}
