Skip to content

Commit

Permalink
Add form-action CSP directive (mastodon#20781)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Nov 17, 2022
1 parent eb80789 commit 7955d4b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def host_to_url(str)
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}" }
Expand Down

0 comments on commit 7955d4b

Please sign in to comment.