Skip to content

Commit 8e90ab3

Browse files
isvictoriousclaude
andcommitted
Update CSP headers in vercel.json to allow analytics services
Add Content-Security-Policy header to allow analytics.google.com and cdn.segment.com in connect-src directive. This fixes console errors from blocked analytics requests while maintaining security restrictions. - Allows Google Analytics (analytics.google.com) - Allows Segment Analytics (cdn.segment.com) - Maintains restrictive policy for other directives - Applies to /docs/* paths Related to EDU-631: https://linear.app/tigerdata/issue/EDU-631/update-csp-headers-in-verceljson-to-allow-analytics Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 0ae9527 commit 8e90ab3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

vercel.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,19 @@
409409
}
410410
]
411411
},
412+
{
413+
"source": "/docs/(.*)",
414+
"headers": [
415+
{
416+
"key": "Cache-Control",
417+
"value": "public, max-age=3600"
418+
},
419+
{
420+
"key": "Content-Security-Policy",
421+
"value": "default-src 'self'; script-src 'self' 'unsafe-inline' analytics.google.com; connect-src 'self' analytics.google.com cdn.segment.com; img-src 'self' data: https:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; frame-ancestors 'none'; form-action 'self'"
422+
}
423+
]
424+
},
412425
{
413426
"source": "/(.*)",
414427
"headers": [

0 commit comments

Comments
 (0)