diff options
author | ThibG <thib@sitedethib.com> | 2020-05-04 13:52:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 13:52:41 +0200 |
commit | dea5db0e25058ae81f9a5120e4154458768a28cb (patch) | |
tree | b2425fe2ab6c6081307b466abdc9917e0bc1d0df | |
parent | ff72c0472f54e34bd69a0821198dbac68e8954ba (diff) |
Fix PgHero Content-Security-Policy when CDN_HOST is used (#13595)
-rw-r--r-- | config/initializers/content_security_policy.rb | 5 | ||||
-rw-r--r-- | config/pghero.yml | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 654e2e8cd..f26d9c8ea 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -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 diff --git a/config/pghero.yml b/config/pghero.yml index 244245d0d..84d0d7eef 100644 --- a/config/pghero.yml +++ b/config/pghero.yml @@ -38,4 +38,4 @@ databases: # aws_secret_access_key: ... # aws_region: us-east-1 -override_csp: true +override_csp: false |