fix: CSP
This commit is contained in:
parent
5592c408ac
commit
f0b0d4651e
@ -18,7 +18,7 @@ Rails.application.config.content_security_policy do |p|
|
||||
p.frame_ancestors :none
|
||||
p.font_src :self, assets_host
|
||||
p.img_src :self, :data, :blob, *media_hosts
|
||||
p.style_src :self, assets_host
|
||||
p.style_src :self, assets_host, *media_hosts
|
||||
p.media_src :self, :data, *media_hosts
|
||||
p.manifest_src :self, assets_host
|
||||
|
||||
@ -57,7 +57,7 @@ Rails.application.config.content_security_policy_nonce_directives = %w(style-src
|
||||
Rails.application.reloader.to_prepare do
|
||||
PgHero::HomeController.content_security_policy do |p|
|
||||
p.script_src :self, :unsafe_inline, assets_host
|
||||
p.style_src :self, :unsafe_inline, assets_host
|
||||
p.style_src :self, :unsafe_inline, assets_host, *media_hosts
|
||||
end
|
||||
|
||||
PgHero::HomeController.after_action do
|
||||
@ -70,8 +70,8 @@ Rails.application.reloader.to_prepare do
|
||||
p.connect_src :none
|
||||
p.frame_ancestors :self
|
||||
p.frame_src :self
|
||||
p.script_src :unsafe_inline
|
||||
p.style_src :unsafe_inline
|
||||
p.script_src :self, :unsafe_inline
|
||||
p.style_src :self, :unsafe_inline, *media_hosts
|
||||
p.worker_src :none
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user