ekzyis fc18a917e3
Add Content Security Policy headers (#805)
* Basic CSP with unsafe-inline, unsafe-eval

* Allow 'self' for img-src and connect-src

Apparently, there is a bug for Chrome on iOS if connect-src does not allow 'self'.

See known issues at https://caniuse.com/contentsecuritypolicy

* Use nonces for strict CSP

* More CSP comments

* Add frame-ancestors directive

* Add more useful headers

* Add HSTS header

* Allow youtube and twitter embeds

For some reason, www.youtube.com is enough. It also works for youtube.com and youtube-nocookie.com.

For twitter embeds from twitter.com or x.com, platform.twitter.com is enough.

* Allow CDN and media domain in CSP

* Only allow unsafe-eval in dev build

* Ignore _next/webpack-hmr in middleware
2024-02-13 13:10:06 -06:00
..
2023-12-04 21:34:06 -06:00
2024-01-30 18:22:40 -06:00
2023-12-04 21:34:06 -06:00
2023-12-25 18:05:45 -06:00
2024-01-19 15:19:26 -06:00
2023-07-24 13:53:53 -05:00
2023-11-08 18:17:01 -06:00
2024-01-11 13:10:07 -06:00
2023-07-24 13:53:53 -05:00
2023-12-20 17:11:07 -06:00