Merge pull request #3943 from betagouv/update/csp
More generic elements to the security policy
This commit is contained in:
commit
7c4c43a96b
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ Rails.application.config.content_security_policy do |policy|
|
||||||
policy.report_uri "http://#{ENV['APP_HOST']}/csp/" # ne pas notifier report-uri en dev/test
|
policy.report_uri "http://#{ENV['APP_HOST']}/csp/" # ne pas notifier report-uri en dev/test
|
||||||
end
|
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
|
||||||
# miniprofiler et nous avons quelques boutons inline :(
|
# miniprofiler et nous avons quelques boutons inline :(
|
||||||
policy.script_src :self, "*.sibautomation.com", "sibautomation.com", "stats.data.gouv.fr", "*.sendinblue.com", :unsafe_eval, :unsafe_inline
|
policy.script_src :self, "*.sibautomation.com", "sibautomation.com", "stats.data.gouv.fr", "*.sendinblue.com", :unsafe_eval, :unsafe_inline
|
||||||
|
@ -16,5 +16,5 @@ Rails.application.config.content_security_policy do |policy|
|
||||||
policy.style_src :self, :unsafe_inline
|
policy.style_src :self, :unsafe_inline
|
||||||
# Pour tout le reste, par défaut on accepte uniquement ce qui vient de chez nous
|
# Pour tout le reste, par défaut on accepte uniquement ce qui vient de chez nous
|
||||||
# et dans la notification on inclue la source de l'erreur
|
# et dans la notification on inclue la source de l'erreur
|
||||||
policy.default_src :self, :data, :report_sample, "fonts.gstatic.com", "in-automate.sendinblue.com", "player.vimeo.com", "app.franceconnect.gouv.fr", "sentry.io", "static.demarches-simplifiees.fr"
|
policy.default_src :self, :data, :report_sample, "fonts.gstatic.com", "in-automate.sendinblue.com", "player.vimeo.com", "app.franceconnect.gouv.fr", "sentry.io", "static.demarches-simplifiees.fr", "*.crisp.chat", "crisp.chat"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue