Merge pull request #3874 from Keirua/fix/csp-reporturi

Changement de l'URL de report-uri
This commit is contained in:
Keirua 2019-05-15 17:17:28 +02:00 committed by GitHub
commit a96568acf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,10 @@
Rails.application.config.content_security_policy do |policy| Rails.application.config.content_security_policy do |policy|
# En cas de non respect d'une des règles, faire un POST sur cette URL # En cas de non respect d'une des règles, faire un POST sur cette URL
policy.report_uri "https://demarches-simplifiees.report-uri.com/r/d/csp/reportOnly" if Rails.env.production?
policy.report_uri "https://demarchessimplifieestest.report-uri.com/r/d/csp/reportOnly"
else
policy.report_uri "http://#{ENV['APP_HOST']}/csp/" # ne pas notifier report-uri en dev/test
end
# Whitelist image # Whitelist image
policy.img_src :self, "*.openstreetmap.org", "static.demarches-simplifiees.fr", "*.cloud.ovh.net", "stats.data.gouv.fr" policy.img_src :self, "*.openstreetmap.org", "static.demarches-simplifiees.fr", "*.cloud.ovh.net", "stats.data.gouv.fr"
# Whitelist JS: nous, sendinblue et matomo # Whitelist JS: nous, sendinblue et matomo