0
0
This commit is contained in:
オスカー、 2024-09-27 19:01:50 +09:00
parent 5592c408ac
commit f0b0d4651e
Signed by: SWREI
GPG Key ID: 139D6573F92DA9F7

View File

@ -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