about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-17 10:55:03 +0100
committerGitHub <noreply@github.com>2022-11-17 10:55:03 +0100
commit7955d4b9592a099a8da3374175461b3aa3057c61 (patch)
treefad156839b173598a3e533040bb666b3a66e8aa6 /config/initializers
parenteb80789b0bdfe0189d4352c77a8fcfa6e40ff164 (diff)
Add form-action CSP directive (#20781)
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/content_security_policy.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb
index 6b62e6f33..cb5629337 100644
--- a/config/initializers/content_security_policy.rb
+++ b/config/initializers/content_security_policy.rb
@@ -26,6 +26,7 @@ Rails.application.config.content_security_policy do |p|
   p.media_src       :self, :https, :data, assets_host
   p.frame_src       :self, :https
   p.manifest_src    :self, assets_host
+  p.form_action     :self
 
   if Rails.env.development?
     webpacker_urls = %w(ws http).map { |protocol| "#{protocol}#{Webpacker.dev_server.https? ? 's' : ''}://#{Webpacker.dev_server.host_with_port}" }