Browse Source

Tighten CSP a bit

closed-social-glitch-2
Thibaut Girka 6 years ago
committed by ThibG
parent
commit
1283e112b9
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      config/initializers/content_security_policy.rb

+ 3
- 2
config/initializers/content_security_policy.rb View File

@ -21,13 +21,14 @@ if Rails.env.production?
p.frame_ancestors :none p.frame_ancestors :none
p.script_src :self, assets_host p.script_src :self, assets_host
p.font_src :self, assets_host p.font_src :self, assets_host
p.img_src :self, :https, :data, :blob
p.img_src :self, :data, :blob, *data_hosts
p.style_src :self, :unsafe_inline, assets_host p.style_src :self, :unsafe_inline, assets_host
p.media_src :self, :data, *data_hosts p.media_src :self, :data, *data_hosts
p.frame_src :self, :https p.frame_src :self, :https
p.worker_src :self, assets_host p.worker_src :self, assets_host
p.connect_src :self, :blob, Rails.configuration.x.streaming_api_base_url, *data_hosts p.connect_src :self, :blob, Rails.configuration.x.streaming_api_base_url, *data_hosts
p.manifest_src :self, :https
p.manifest_src :self, assets_host
p.form_action :self
end end
end end

Loading…
Cancel
Save