]> cat aescling's git repositories - mastodon.git/commitdiff
Fix PgHero Content-Security-Policy when CDN_HOST is used (#13595)
authorThibG <thib@sitedethib.com>
Mon, 4 May 2020 11:52:41 +0000 (13:52 +0200)
committerGitHub <noreply@github.com>
Mon, 4 May 2020 11:52:41 +0000 (13:52 +0200)
config/initializers/content_security_policy.rb
config/pghero.yml

index 654e2e8cdefc0cc6ae5f0688acc716490ec1183e..f26d9c8ea3762ebb7e206c8fabb0022b045049e1 100644 (file)
@@ -46,3 +46,8 @@ end
 # For further information see the following documentation:
 # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
 # Rails.application.config.content_security_policy_report_only = true
+
+PgHero::HomeController.content_security_policy do |p|
+  p.script_src :self, :unsafe_inline, assets_host
+  p.style_src  :self, :unsafe_inline, assets_host
+end
index 244245d0df7a1f62f166b7ff719bca011887674b..84d0d7eef0e3cd8dc7288404effcbdc294f92d95 100644 (file)
@@ -38,4 +38,4 @@ databases:
 # aws_secret_access_key: ...
 # aws_region: us-east-1
 
-override_csp: true
+override_csp: false