try to fix ruffle on chrome

This commit is contained in:
Henry Jameson 2021-04-12 00:38:25 +03:00 committed by Mark Felder
parent 0e1356ef9c
commit db76ea578a
1 changed files with 3 additions and 1 deletions

View File

@ -117,7 +117,9 @@ defp csp_string do
if Config.get(:env) == :dev do if Config.get(:env) == :dev do
"script-src 'self' 'unsafe-eval'" "script-src 'self' 'unsafe-eval'"
else else
"script-src 'self'" # TODO right now unsafe-eval is needed for WASM to load in chrome
# see: https://github.com/WebAssembly/content-security-policy/issues/7
"script-src 'self' 'unsafe-eval'"
end end
report = if report_uri, do: ["report-uri ", report_uri, ";report-to csp-endpoint"] report = if report_uri, do: ["report-uri ", report_uri, ";report-to csp-endpoint"]