Skip to content

Commit

Permalink
Use "unsafe-wasm-eval" instead of "unsafe-eval" in script-src CSP (#2…
Browse files Browse the repository at this point in the history
…0606)

* Add "unsafe-eval" to script-src CSP

* Use 'unsafe-wasm-eval' instead of 'unsafe-eval'
  • Loading branch information
prplecake authored Nov 15, 2022
1 parent b59683c commit b46b7c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def host_to_url(str)
p.worker_src :self, :blob, assets_host
else
p.connect_src :self, :data, :blob, assets_host, media_host, Rails.configuration.x.streaming_api_base_url
p.script_src :self, assets_host, :unsafe_eval
p.script_src :self, assets_host, "'unsafe-wasm-eval'"
p.child_src :self, :blob, assets_host
p.worker_src :self, :blob, assets_host
end
Expand Down

0 comments on commit b46b7c3

Please sign in to comment.