-
Notifications
You must be signed in to change notification settings - Fork 162
Description
When deploying ChatKit in non-development environments, we're required to add our domains to OpenAI's domain allowlist. However, the current allowlist implementation doesn't support wildcard subdomain patterns (e.g., *.example.com), which creates significant friction for modern deployment workflows.
Problem
Many teams use deployment platforms that generate dynamic subdomains for preview/staging environments:
- Vercel:
my-app-<hash>-<team>.vercel.appormy-app-git-<branch>-<team>.vercel.app - Netlify:
deploy-preview-<number>--<site>.netlify.app - Custom CI/CD: Internal preview deployments like
myapp-pr-123.preview.company.com
Since these URLs are generated dynamically per commit/PR, it's impossible to pre-register them in the allowlist. This effectively means:
- ChatKit cannot be tested in preview deployments before merging to production
- Teams with dynamic internal deployment systems cannot use ChatKit at all
- Every new preview environment requires manual allowlist updates, which defeats the purpose of automated deployments
Proposed Solution
Support wildcard patterns in the domain allowlist:
*.vercel.app
my-app-*.vercel.app # better!
*.preview.mycompany.com
myapp-pr-*.preview.mycompany.com # better!
Alternatively, provide a way to:
- Allowlist by project/team identifier rather than exact domain
- Support regex patterns for more flexible matching
- Offer a "preview mode" token with relaxed domain restrictions for non-production use
Impact
This limitation blocks adoption for teams that rely on preview deployments as part of their development workflow, which is increasingly standard practice.