Permissions-Policy: Controls which browser APIs (camera, microphone, geolocation, etc.) your page can use, and on which origins. Permissions-Policy is a response header that controls which browser features a page, and any iframes inside it, may use. Camera, microphone, geolocation, payment and fullscreen are examples. Permissions-Policy: camera=(), microphone=(), geolocation=(self) blocks camera and microphone completely and allows location only for your own origin. A compromised script or an embedded third-party widget then cannot ask visitors for those permissions.
Frequently asked questions about Permissions-Policy
What should you keep in mind with Permissions-Policy?
For most business websites, the safe default is to disable every powerful feature you do not use. It costs nothing and reduces the damage an injected script could do. If you embed a map or a video player that needs a feature, allow it for that specific origin only. It works best together with other security headers like Content-Security-Policy.
What does an example of Permissions-Policy look like?
Use when reviewing or setting HTTP response headers for a web app or API - security headers (Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy), CORS headers, caching headers (Cache-Control, ETag, Last-Modified, Vary) and cookies (Set-Cookie flags). Also use when a security scan reports missing headers.
OWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities ("run OWASP audit", "security review", "check my app security") or writing secure Laravel code involving auth, payments, file uploads, or API design. Triggers on security-related tasks, payment handling, authentication, or any request to audit a Laravel codeba
Configure Static Application Security Testing (SAST) tools for automated vulnerability detection in application code. Use when setting up security scanning, implementing DevSecOps practices, or automating code vulnerability detection.