add HTTP Permissions-Policy header
TODO
-
add HTTP Permissions-Policy
header, via .htaccess rules (Apache web server)
Resolve "add HTTP Permissions-Policy header" -... (!27 - merged) -
remplace .htaccess rules by custom Symfony code
About
The HTTP Permissions-Policy header provides a mechanism to allow and deny the use of browser features in a document or within any elements in the document.
- MDN documenation https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy
- W3C Specification https://www.w3.org/TR/permissions-policy/
- W3C Permissions Policy Explainer https://github.com/w3c/webappsec-permissions-policy/blob/main/permissions-policy-explainer.md
- W3C Policy Controlled Features https://github.com/w3c/webappsec-permissions-policy/blob/main/features.md
- Chrome documenation https://developer.chrome.com/docs/privacy-sandbox/permissions-policy/
- Permissions-Policy Generator https://www.permissionspolicy.com
- Security Headers scanner https://securityheaders.com
.htaccess rules
<IfModule mod_headers.c>
# HTTP Permissions-Policy header
# - W3C Specification https://www.w3.org/TR/permissions-policy/
# - W3C Permissions Policy Explainer https://github.com/w3c/webappsec-permissions-policy/blob/main/permissions-policy-explainer.md
# - W3C Policy Controlled Features https://github.com/w3c/webappsec-permissions-policy/blob/main/features.md
# - MDN documenation https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy
# - Chrome documenation https://developer.chrome.com/docs/privacy-sandbox/permissions-policy/
# - Permissions-Policy Generator https://www.permissionspolicy.com
Header set Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), camera=(), cross-origin-isolated=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), navigation-override=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), web-share=(), xr-spatial-tracking=(), clipboard-read=(), clipboard-write=()"
</IfModule>
Edited by Fabrice Gangler