chore: allow shapeshift.com subdomains and any localhost in cors#253
Conversation
Replace the hardcoded origin allowlist with regex matchers so any shapeshift.com subdomain (including multi-level like dashboard.revenue.shapeshift.com) and any localhost variant (e.g. web.localhost:1335) are accepted without further config changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughCORS configuration in the agentic server replaces a hardcoded allowlist with regex-based origin validation. Two patterns permit localhost origins (any protocol, subdomains, ports) and shapeshift.com subdomains over HTTPS, enforced via a CORS middleware callback. ChangesCORS Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
apps/agentic-server/src/server.tswith regex matchersshapeshift.comsubdomain at arbitrary depth is now accepted (e.g.app.shapeshift.com,dashboard.revenue.shapeshift.com,dev-dashboard.revenue.shapeshift.com)localhosthost with optional subdomains/port is now accepted (e.g.http://localhost:3000,http://web.localhost:1335)Test plan
/api/chatfromhttps://app.shapeshift.comand confirmAccess-Control-Allow-Originechoes back/api/chatfrom a multi-level subdomain (e.g.https://dashboard.revenue.shapeshift.com) and confirm it's allowed/api/chatfromhttp://web.localhost:1335and confirm it's allowed/api/chatfrom a spoof origin likehttps://evil-shapeshift.comand confirm the CORS header is not set🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes