Proxy browser APIs through web service
This commit is contained in:
+6
-12
@@ -12,19 +12,13 @@ working services and redirect HTTP to HTTPS.
|
||||
|
||||
## Traefik
|
||||
|
||||
Create three routers for `doctor.ranaze.com`, ordered by priority:
|
||||
Create one `websecure` router with a host rule for `doctor.ranaze.com` and route
|
||||
it to the Kubernetes nodes on port `30089`, the Web game NodePort. Reuse the existing
|
||||
certificate resolver, load-balancing node list, and HTTP-to-HTTPS middleware.
|
||||
|
||||
1. `Host(`doctor.ranaze.com`) && PathPrefix(`/api/Auth`)` routes to the same
|
||||
backend service used by `pauth.ranaze.com`.
|
||||
2. `Host(`doctor.ranaze.com`) && PathPrefix(`/api`)` routes to the Kubernetes
|
||||
nodes on port `30088`, the Questions API NodePort.
|
||||
3. `Host(`doctor.ranaze.com`)` routes to the Kubernetes nodes on port `30089`,
|
||||
the Web game NodePort.
|
||||
|
||||
Do not strip any prefixes. Give the auth router the highest priority, the
|
||||
general API router the next-highest priority, and the Web router the lowest.
|
||||
Reuse the existing HTTPS entrypoint, certificate resolver, load-balancing node
|
||||
list, and HTTP-to-HTTPS middleware.
|
||||
The Web container proxies `/api/Auth/*` to `pauth.ranaze.com` and all other
|
||||
`/api/*` requests to `s3q.ranaze.com`, so Traefik does not need separate API
|
||||
routers or prefix middleware for this hostname.
|
||||
|
||||
## Verification
|
||||
|
||||
|
||||
Reference in New Issue
Block a user