about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-11-10 18:53:23 +0100
committerThibG <thib@sitedethib.com>2018-11-12 15:43:02 +0100
commit1283e112b9d6ab1424973a03ee26b27f39119b57 (patch)
tree8b96bd40b52f69c2383cd62d7a3d442d8fb86773
parent09562b0fcc193d66f89a9f2c7eb2684e2e554d83 (diff)
Tighten CSP a bit
-rw-r--r--config/initializers/content_security_policy.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb
index 76236aa21..1617ad1c1 100644
--- a/config/initializers/content_security_policy.rb
+++ b/config/initializers/content_security_policy.rb
@@ -21,13 +21,14 @@ if Rails.env.production?
     p.frame_ancestors :none
     p.script_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.media_src       :self, :data, *data_hosts
     p.frame_src       :self, :https
     p.worker_src      :self, assets_host
     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