mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
This reverts commit 767b49232e.
If anything else (e.g. GTM integration) introduces a nonce/hash, then this change stops the splash screen JS to fail and makes sites unusable.
This commit is contained in:
@@ -43,10 +43,6 @@ class ContentSecurityPolicy
|
||||
|
||||
@directives.each do |directive, sources|
|
||||
if sources.is_a?(Array)
|
||||
if sources.include?("'unsafe-inline'")
|
||||
# Sending nonce- or sha###- values will disable unsafe-inline, so skip them
|
||||
sources = sources.reject { |s| s.start_with?("'nonce-", "'sha") }
|
||||
end
|
||||
policy.public_send(directive, *sources)
|
||||
else
|
||||
policy.public_send(directive, sources)
|
||||
|
||||
Reference in New Issue
Block a user