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
Custom domains
Security domains
Reference
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 deploy binds domains declared in gateway.routes automatically
- 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 in tcb routes
Deprecated
tcb service is deprecated since v3.0.0. It stays backward compatible but is no longer maintained.
| Command | Behavior | Replacement |
|---|
tcb service create | Create an HTTP gateway path | tcb routes add |
tcb service delete | Delete an HTTP gateway path | tcb routes delete |
tcb service list | List HTTP gateway paths | tcb routes list |
tcb service switch | Enable or disable the HTTP gateway | tcb routes edit (enable field, per route) |
tcb service auth switch | Enable or disable HTTP gateway authentication | tcb routes edit |
tcb service domain bind | Bind a custom domain | tcb domains add |
tcb service domain unbind | Unbind a custom domain | tcb domains rm |
tcb service domain list | List custom domains | tcb domains ls |