You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 10c467d
Browse filesBrowse the repository at this point in the historyBrowse files
fix: allow trust portal subdomains and custom domains through CORS (#2354)
Trust portals are served on dynamic subdomains (e.g. security.trycomp.ai,
acme.trust.inc) and verified custom domains (e.g. trust.acmecorp.com),
but the CORS config only had a static allowlist. This caused browsers to
block requests from trust portals to api.trycomp.ai.
- Add isStaticTrustedOrigin() for sync checks (*.trycomp.ai, *.trust.inc)
- Add async isTrustedOrigin() that also checks verified custom domains
from the DB via Upstash Redis cache (5-min TTL)
- Update CORS origin callback, origin-check middleware, and
cors-exception filter to use the new functions
- Update tests to cover subdomain matching and async behavior
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments