fix: add Segment CDN domains to CSP for LFX Segments Analytics#479
fix: add Segment CDN domains to CSP for LFX Segments Analytics#479ahmedomosanya merged 1 commit intomainfrom
Conversation
- Add https://cdn.segment.com to connect-src and script-src - Resolves CSP violation errors when loading analytics configurations - Enables proper initialization of LFX Segments Analytics library - Maintains security while allowing necessary analytics functionality Fixes CSP error: 'Refused to connect to https://cdn.segment.com/v1/projects/.../settings' Addresses: linuxfoundation/easycla#4790 Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
WalkthroughUpdated Content Security Policy in edge/security-headers.js to include https://cdn.segment.com in connect-src and script-src directives. No other logic or exports changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (2)
Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes Content Security Policy (CSP) violations by adding the Segment CDN domain to the allowlist for analytics functionality. The change enables proper initialization of LFX Segments Analytics library by allowing connections to and script loading from the Segment CDN.
Key Changes
- Added
https://cdn.segment.comto bothconnect-srcandscript-srcCSP directives - Maintained security while enabling necessary analytics functionality
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Fixes CSP error: 'Refused to connect to https://cdn.segment.com/v1/projects/.../settings'
Addresses: linuxfoundation/easycla#4790
Signed-off-by: ahmedomosanya aopeyemi@contractor.linuxfoundation.org
Summary by CodeRabbit