Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nosecone: Permission-Policy #2426

Open
blaine-arcjet opened this issue Dec 4, 2024 · 1 comment
Open

Nosecone: Permission-Policy #2426

blaine-arcjet opened this issue Dec 4, 2024 · 1 comment

Comments

@blaine-arcjet
Copy link
Contributor

Via @davidmytton

We probably want to support the Permission-Policy header in Nosecone. However, we want to make sure that it doesn't generate a ton of warnings for our users to try to understand.

For example:

By default next-safe set permissionsPolicy as follows:

feature-policy: clipboard-read 'none';clipboard-write 'none';gamepad 'none';speaker-selection 'none';accelerometer 'none';ambient-light-sensor 'none';autoplay 'none';battery 'none';camera 'none';cross-origin-isolated 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';execution-while-not-rendered 'none';execution-while-out-of-viewport 'none';fullscreen 'none';geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';midi 'none';navigation-override 'none';payment 'none';picture-in-picture 'none';publickey-credentials-get 'none';screen-wake-lock 'none';sync-xhr 'none';usb 'none';web-share 'none';xr-spatial-tracking 'none';
permissions-policy: clipboard-read=(),clipboard-write=(),gamepad=(),speaker-selection=(),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=(),magnetometer=(),microphone=(),midi=(),navigation-override=(),payment=(),picture-in-picture=(),publickey-credentials-get=(),screen-wake-lock=(),sync-xhr=(),usb=(),web-share=(),xr-spatial-tracking=()

This generated the following errors in the Chrome console:

Error with Feature-Policy header: Unrecognized feature: 'speaker-selection'.
Error with Feature-Policy header: Unrecognized feature: 'ambient-light-sensor'.
Error with Feature-Policy header: Unrecognized feature: 'battery'.
Error with Feature-Policy header: Unrecognized feature: 'document-domain'.
Error with Feature-Policy header: Unrecognized feature: 'execution-while-not-rendered'.
Error with Feature-Policy header: Unrecognized feature: 'execution-while-out-of-viewport'.
Error with Feature-Policy header: Unrecognized feature: 'navigation-override'.
Error with Feature-Policy header: Some features are specified in both Feature-Policy and Permissions-Policy header: clipboard-read, clipboard-write, gamepad, accelerometer, autoplay, camera, cross-origin-isolated, display-capture, encrypted-media, fullscreen, geolocation, gyroscope, magnetometer, microphone, midi, payment, picture-in-picture, publickey-credentials-get, screen-wake-lock, sync-xhr, usb, web-share, xr-spatial-tracking. Values defined in Permissions-Policy header will be used.
Error with Permissions-Policy header: Unrecognized feature: 'speaker-selection'.
Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
Error with Permissions-Policy header: Unrecognized feature: 'battery'.
Error with Permissions-Policy header: Unrecognized feature: 'document-domain'.
Error with Permissions-Policy header: Unrecognized feature: 'execution-while-not-rendered'.
Error with Permissions-Policy header: Unrecognized feature: 'execution-while-out-of-viewport'.
Error with Permissions-Policy header: Unrecognized feature: 'navigation-override'.
@blaine-arcjet
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant