cloudflare / worker-sites-template

Apache License 2.0
81 stars 39 forks source link

`Feature-Policy` error in Chrome devtools #51

Open adamschwartz opened 4 years ago

adamschwartz commented 4 years ago

image

https://github.com/cloudflare/worker-sites-template/blob/0adcb0e9d51654c6d7987189463e757b2815c8e8/workers-site/index.js#L54

See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy

mre commented 4 years ago

I'm running into the same problems with my site. As per your link the syntax is

Feature-Policy: <directive> <allowlist>

so we're missing the Feature Policy directive here. As I doubt there is a sensible default that works for all pages here I'd propose to remove the header altogether. Did so for my site and the error went away.