Skip to content

Commit

Permalink
🤖 backported "Fix CSP issue for Google Analytics" (metabase#18303)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 6, 2021
1 parent b7a4d19 commit c529fe2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/metabase/server/middleware/security.clj
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@
"'unsafe-eval'" ; TODO - we keep working towards removing this entirely
"https://maps.google.com"
"https://apis.google.com"
"https://www.google-analytics.com" ; Safari requires the protocol
"https://*.googleapis.com"
"*.gstatic.com"
(when (public-settings/anon-tracking-enabled)
"https://www.google-analytics.com")
;; for webpack hot reloading
(when config/is-dev?
"localhost:8080")
Expand All @@ -76,6 +77,10 @@
:connect-src ["'self'"
;; MailChimp. So people can sign up for the Metabase mailing list in the sign up process
"metabase.us10.list-manage.com"
;; Google analytics
(when (public-settings/anon-tracking-enabled)
"www.google-analytics.com")
;; Webpack dev server
(when config/is-dev?
"localhost:8080 ws://localhost:8080")]
:manifest-src ["'self'"]}]
Expand Down

0 comments on commit c529fe2

Please sign in to comment.