Browse Source

Fix PgHero Content-Security-Policy when CDN_HOST is used (#13595)

main
ThibG 2 years ago committed by GitHub
parent
commit
dea5db0e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      config/initializers/content_security_policy.rb
  2. 2
      config/pghero.yml

5
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

2
config/pghero.yml

@ -38,4 +38,4 @@ databases:
# aws_secret_access_key: ...
# aws_region: us-east-1
override_csp: true
override_csp: false

Loading…
Cancel
Save