Merge pull request #9124 from colinux/dev-csp-report

ETQ dev je ne veux plus de requêtes infinies sur /csp
This commit is contained in:
Colin Darie 2023-06-02 08:32:04 +00:00 committed by GitHub
commit 2197101f67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ Rails.application.config.content_security_policy do |policy|
# CSP are not enforced in development (see content_security_policy_report_only in development.rb)
# However we notify a random local URL, to see breakage in the DevTools when adding a new external resource.
policy.report_uri "http://#{ENV.fetch('APP_HOST')}/csp/"
policy.report_uri CSP_REPORT_URI if CSP_REPORT_URI.present?
elsif Rails.env.test?
# Disallow all connections to external domains during tests