DOMAIN_MAP Builder
Configure one or more domains for SocketX Server, validate your settings, and copy a ready-to-use DOMAIN_MAP environment variable value.
Domain Configuration — 1 domain
Domain 1
Hostrequired
The incoming Host header value SocketX receives, e.g. "socketx.example.com" or "localhost:8080". Use "*" as a wildcard fallback, or "*.example.com" to match subdomains.Host is required.Upstream WebSocket URLrequired
The backend WebSocket service to proxy decoded frames to. Must start with ws:// (plaintext leg) or wss:// (TLS-protected leg). The client-supplied pathname is appended to this URL.Upstream URL is required.Allowed Originsrequired
Comma-separated list of allowed browser origins. Use * to allow all. Exact origins include the scheme, e.g. https://app.example.com. Wildcard origins must begin with *. after the scheme, e.g. https://*.example.com.At least one origin is required — empty lists reject all connections.⚠ 3 validation issues — fix them to enable output.
Host matching reference
SocketX Server matches the incoming Host header against your DOMAIN_MAP keys in this order:
- Exact host match —
api.example.comorlocalhost:8080. The Host header may include a port, so include the port in the key when clients connect with one. - Subdomain wildcard —
*.example.commatches any single-label subdomain. - Global wildcard —
*matches any host not matched by a more specific key.
If no key matches, the connection is rejected before the WebSocket upgrade. Non-browser clients may omit the Origin header entirely; use * in allowed origins when that is required for your environment. See the DOMAIN_MAP documentation for full details.