Change form-action Content-Security-Policy directive to be more restrictive (#26897)

This commit is contained in:
Claire authored and GitHub committed 2024-09-12 13:24:19 +00:00
1 parent 5f782f9629
commit a496aeabcb
4 files changed
+29 -21

No files matched your search

@@ -8,6 +8,16 @@ module WebAppControllerConcern
before_action :redirect_unauthenticated_to_permalinks!
before_action :set_app_body_class
content_security_policy do |p|
policy = ContentSecurityPolicy.new
if policy.sso_host.present?
p.form_action policy.sso_host
else
p.form_action :none
end
end
end
def skip_csrf_meta_tags?