Skip to content

Commit 0940e90

Browse files
author
Elle Meredith
committed
Include "api.segment.io" in connect_src policy
Linear: https://linear.app/buildkite/issue/ONB-29/🔗-integrate-docs-with-segment
1 parent 08ef5e2 commit 0940e90

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

config/initializers/content_security_policy.rb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,8 @@
2525

2626
policy.script_src(
2727
:self,
28-
'https://www.googletagmanager.com/',
29-
30-
# Allow Segment's Analytics.js 2.0
31-
# https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2/#using-a-strict-content-security-policy-on-the-page
32-
"https://cdn.segment.com/analytics.js/v1/q0LtPl49tgnyHHY8PGBsPsshHk9AVNKm/analytics.min.js", # production
33-
"https://cdn.segment.com/analytics.js/v1/EuoLh8Z8RQR0GXhCWz3H0ddTSIV4ysJv/analytics.min.js", # development
34-
"https://cdn.segment.com/analytics-next/bundles/",
35-
"https://cdn.segment.com/next-integrations/integrations/"
28+
"https://www.googletagmanager.com/",
29+
"https://cdn.segment.com/"
3630
)
3731

3832
policy.connect_src(
@@ -42,10 +36,8 @@
4236
"https://#{ENV['ALGOLIA_APP_ID']}-2.algolianet.com",
4337
"https://#{ENV['ALGOLIA_APP_ID']}-3.algolianet.com",
4438

45-
# Allow Segment's Analytics.js 2.0
46-
# https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2/#using-a-strict-content-security-policy-on-the-page
47-
"https://cdn.segment.com/v1/projects/q0LtPl49tgnyHHY8PGBsPsshHk9AVNKm/settings", # production
48-
"https://cdn.segment.com/v1/projects/EuoLh8Z8RQR0GXhCWz3H0ddTSIV4ysJv/settings" # development
39+
"https://cdn.segment.com/",
40+
"https://api.segment.io/"
4941
)
5042

5143
# Specify URI for violation reports

0 commit comments

Comments
 (0)