Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
Update content security policy
Browse files Browse the repository at this point in the history
- need to include google analytics domain because initialising GA involves a call to append a new script onto the DOM and run it
  • Loading branch information
andysellick committed Oct 22, 2020
1 parent 31c9395 commit 73cc9ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

# we're also setting a nonce, which will cause browsers which
# support nonces to ignore the :unsafe_inline directive.
policy.script_src :self, :unsafe_inline
policy.script_src :self, :unsafe_inline, "https://www.google-analytics.com"
policy.img_src :self, "https://www.google-analytics.com"

# Specify URI for violation reports
# policy.report_uri "/csp-violation-report-endpoint"
Expand Down

0 comments on commit 73cc9ff

Please sign in to comment.