{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/2"}],"enrichment":{"capability":"Sets the Permissions-Policy HTTP header on Django responses to control which browser features scripts and iframes can access.","skillfed_tags":["django-middleware","browser-security","http-headers"],"use_cases":["Disable privacy-invasive features like geolocation and camera across your entire Django app by default.","Allow autoplay only from your own origin and trusted third-party iframe sources.","Test a restrictive permissions policy in report-only mode before enforcing it site-wide.","Override the global policy on specific views that legitimately need camera or payment APIs.","Enforce strict feature restrictions on public-facing pages while relaxing them on authenticated admin areas."],"what_it_does":"django-permissions-policy is a Django middleware that injects the Permissions-Policy HTTP header into your application's responses, allowing you to declaratively restrict which browser capabilities (geolocation, camera, microphone, payment APIs, etc.) are available to scripts running on your pages. You configure it via a Django setting that maps feature names to lists of allowed origins, then the middleware automatically adds the header to every response. It also supports a report-only mode for testing policies before enforcement, and per-view decorator overrides for fine-grained control.\n\nThe package depends only on Django and asgiref, integrating cleanly into Django's middleware pipeline. It validates configuration at instantiation time to catch policy errors early, and supports both the enforced Permissions-Policy header and the non-enforcing Permissions-Policy-Report-Only header for gradual rollout. The middleware can be instantiated with explicit policy dictionaries for advanced use cases like dispatching between multiple policies within another middleware.","worth_installing":"Yes. The package is actively maintained, has no known vulnerabilities, integrates seamlessly into Django's middleware stack with low friction, and solves a real security/privacy concern with minimal configuration. Use it if you want to control browser feature access in your Django app."},"id":"django-permissions-policy","links":{"html":"https://skillfed.io/packages/django-permissions-policy","md":"https://skillfed.io/packages/django-permissions-policy.md","pypi":"https://pypi.org/project/django-permissions-policy/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-14","license_spdx":"MIT","license_treatment":"permissive","name":"django-permissions-policy","python_support":"supports_current","summary":"Set the Permissions-Policy HTTP header on your Django app."},"popularity":{"monthly_downloads":466341,"position":6504,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"4.33.0"}
