0
0
Fork 0

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

This commit is contained in:
Claire 2024-09-12 15:24:19 +02:00 committed by GitHub
parent 5f782f9629
commit a496aeabcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 21 deletions

View file

@ -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?