Update CSP to allow wasm compilation in web repl

This commit is contained in:
Richard Feldman 2022-03-02 23:58:06 -05:00
parent 3938dd476d
commit 70b739bbfc
No known key found for this signature in database
GPG Key ID: 7E4127D1E4241798

View File

@ -14,7 +14,10 @@
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
Content-Security-Policy = "default-src 'self'; img-src *;"
# unsafe-eval is needed for wasm compilation in the repl to work on Safari and Chrome;
# otherwise they block it.
# TODO figure out how to tell Netlify to apply that policy only to the repl, not to everything.
Content-Security-Policy = "default-src 'self'; img-src *; script-src 'self' 'unsafe-eval';"
X-Content-Type-Options = "nosniff"
# Redirect roc-lang.org/authors to the AUTHORS file in this repo