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

Feature Policy warnings #453

Open
scott2b opened this issue Jan 14, 2021 · 0 comments
Open

Feature Policy warnings #453

scott2b opened this issue Jan 14, 2021 · 0 comments
Labels

Comments

@scott2b
Copy link
Member

scott2b commented Jan 14, 2021

YouTube embeds (possibly others?) trigger a large number of "Feature Policy" warnings that seem to stem from the feature allow list set on the video iframe embed.

Feature policies are tweakable via the Feature-Policy response header

The iframe itself comes from the YouTube iframe embed API which sets a number of "allows" including, among others: autoplay, accelerometer, clipboard-write.

Because we are not setting the Feature-Policy header on CDN content, there is then a resulting discontinuity between what the YouTube API is allowing and what the page response headers are allowing, resulting in these warnings. Since the warnings result in the browser erring on the side of safety, they are not especially problematic, but are indicative of potential features that might be unlocked. In particular we may want to support autoplay -- it is not clear if any of the other features might be useful.

At this time, the YouTube iframe embed API does not seem to support tweaking the allow list. Thus, the fix to this would be either to allow all of these features via Feature-Policy header, or to generate our own iframe code without the API. (Note that simply modifying the allow list after the iframe is injected will not actually squelch these warnings.)

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

No branches or pull requests

1 participant