tcb routes / tcb domains / tcb cors
Manage the entry points of the HTTP gateway: routing rules decide which upstream service receives a request, custom domains provide the addresses, and security domains control which web origins may call CloudBase with the Web SDK.
Command index
Gateway routes
| Command | Purpose |
|---|---|
tcb routes list | List routes, filter by domain or upstream type |
tcb routes add | Create a route bound to a function, CloudBase Run service, or static hosting |
tcb routes edit | Update forwarding and auth settings of an existing route |
tcb routes delete | Delete routes |
Custom domains
| Command | Purpose |
|---|---|
tcb domains ls | List custom domains |
tcb domains add | Bind a custom domain with direct, CDN, custom, or EO access |
tcb domains edit | Update the certificate, access type, and other domain settings |
tcb domains rm | Unbind a custom domain |
tcb domains cache purge | Submit a CDN or EO cache purge |
tcb domains cache task | Query purge progress and history |
Security domains
| Command | Purpose |
|---|---|
tcb cors list | List security domains |
tcb cors add | Add security domains |
tcb cors rm | Delete security domains |
Reference
| Document | Content |
|---|---|
| Configuration file - gateway | The gateway.routes field of cloudbaserc.json |
| Forwarding version | Semantics of the upstreamResourceVersion field, which pins traffic to a specific function or CloudBase Run version |
Notes
- Security domains (
tcb cors) manage the CORS allowlist for the Web SDK; custom domains (tcb domains) are the access domains of the HTTP gateway, require an SSL certificate, and work together with routes - The imperative route commands require the domain to be bound with
tcb domains add;tcb deploybinds domains declared ingateway.routesautomatically - The domain commands accept
--platform-id <platformId>for platform edition resource pools (v3.8.3+); cache purge does not support the platform edition - Cache purge lives in
tcb domains cache, not intcb routes