Merge pull request #3874 from Keirua/fix/csp-reporturi
Changement de l'URL de report-uri
This commit is contained in:
commit
a96568acf4
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue