MENU
Feature Policy
Special permission from the user is sometimes required to gain access to certain hardware features or browser APIs. A Feature Policy is defined as a semi-colon-separated list of directives and allowed lists. (more information here
). To set a Feature Policy, send a Feature-Policy header in the HTTP response or use the 'allow' attribute on an iframe.
Directives: accelerometer, ambient-light-sensor, autoplay, battery, camera, display-capture, document-domain, encrypted-media, execution-while-not-rendered, execution-while-out-of-viewport, fullscreen, geolocation, gyroscope, layout-animations, legacy-image-formats, magnetometer, microphone, midi, navigation-override, oversized-images, payment, picture-in-picture, publickey-credentials, sync-xhr, usb, wake-lock, xr-spatial-tracking
Allowed Lists:
*: allowed in this document and all nested iframes of all origins
'self': allowed in this document and all nested iframes from the same origin
'src': allowed in this iframe as long as coming from the same origin as the iframe
'none': disabled in top-level and nested iframes
<origin(s)>: allowed in specific origins