fix: route people.* to frontend; path-route API/admin/oauth2 to backend

people.* now routes / to people-frontend (nginx/React SPA).
Path prefixes /api/, /admin/, and /o/ are forwarded to people-backend
(Django/gunicorn), matching the app's URL structure.

Previously all people.* traffic hit people-backend directly, causing
Django to return 404 "Page not found at /" for the root path.

The [[routes.paths]] mechanism already existed in the proxy (used by
the auth route) — only a config update was needed.
This commit is contained in:
2026-03-03 01:04:10 +00:00
parent 8621c0dd65
commit 419a45b3a7

View File

@@ -62,7 +62,20 @@ data:
[[routes]] [[routes]]
host_prefix = "people" host_prefix = "people"
backend = "http://people-backend.lasuite.svc.cluster.local:80" backend = "http://people-frontend.lasuite.svc.cluster.local:80"
# Backend handles the API, Django admin, and OAuth2 provider.
[[routes.paths]]
prefix = "/api/"
backend = "http://people-backend.lasuite.svc.cluster.local:80"
[[routes.paths]]
prefix = "/admin/"
backend = "http://people-backend.lasuite.svc.cluster.local:80"
[[routes.paths]]
prefix = "/o/"
backend = "http://people-backend.lasuite.svc.cluster.local:80"
[[routes]] [[routes]]
host_prefix = "find" host_prefix = "find"