Skip to content

Feature Request: Support wildcard subdomains in domain allowlist #155

@serialx

Description

@serialx

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.app or my-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:

  1. ChatKit cannot be tested in preview deployments before merging to production
  2. Teams with dynamic internal deployment systems cannot use ChatKit at all
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions