fix(api): route tenants through origin gateway
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

This commit is contained in:
2026-08-20 14:23:12 +04:00
parent bbf12cad33
commit f4ea4c7af8
18 changed files with 241 additions and 69 deletions

View File

@@ -1,9 +1,13 @@
# Deployment — server provisioning, CD, TLS
Frontend only. The backend service (`:8080`) is a separate developer's responsibility; nginx already proxies `/api/` to it and will `502` until it exists.
Frontend only. The backend service (`:8080`) is a separate developer's responsibility; nginx proxies the same-origin `/backend/` gateway (and the legacy direct `/api/` route) to it and will `502` until it exists.
**Multi-tenant, one bundle.** Every customer domain is served by the same build. The SPA resolves its tenant from the `Host` header ([BACKEND-HANDOFF §1a](backend/BACKEND-HANDOFF.md)). One deploy updates every domain simultaneously — there is no per-tenant build and no per-tenant deploy.
All browser API traffic uses `{origin}/backend/...`. nginx removes `/backend/`
before forwarding and preserves `Host`; do not replace this with a hardcoded API
domain or a direct backend port, because that breaks custom domains and CORS.
---
## 1. Files