Loading...
Loading...
Formerly "Feature-Policy", this header allows you to enable or disable browser features and APIs (like Camera, Microphone, Geolocation, USB).
If your site gets XSS'd, the attacker can try to access the user's webcam or microphone. Explicitly disabling these features limits the "blast radius" of a compromise. It also prevents third-party iframes (ads) from accessing these sensors without your knowledge.
The syntax is `feature=(allowlist)`. Using `()` means "nobody". Recommended baseline: disable powerful features you don't use.
Permissions-Policy ships as a single HTTP response header. Absence of the header means every feature defaults to the browser's permissive default. Check with curl and inspect which features you actually need open.
curl -sI https://yourdomain.com | grep -i permissions-policygrep -rE "navigator\.(geolocation|mediaDevices|usb|bluetooth)|new PaymentRequest" ./srcFeature-Policy is the deprecated predecessor. Chrome dropped support for it in 2024; Firefox never implemented it. Use `Permissions-Policy` exclusively and use the `feature=()` syntax, not the space-separated `feature 'none'` syntax.
Only if those embeds need features your policy blocks. Check the iframe `allow` attribute on your embeds (YouTube needs `autoplay`, `encrypted-media`; Stripe needs `payment`). Grant those features via `allow=` on the iframe, and leave the default document policy strict.
Disable features you do not use: `camera=(), microphone=(), geolocation=(), payment=(), usb=(), magnetometer=(), accelerometer=(), gyroscope=()`. This blocks the highest-risk APIs and can be relaxed per-feature as needed.
Applied the configuration change? Run a live scan to confirm the vulnerability is patched.