[verified] route app-dev API through same-origin proxy

This commit is contained in:
2026-06-07 20:43:20 +01:00
parent 7326b9f3be
commit 7db852aaff
2 changed files with 13 additions and 2 deletions
+7 -2
View File
@@ -16,8 +16,13 @@ services:
context: .
dockerfile: Dockerfile
args:
VITE_API_BASE: ${VITE_API_BASE:-}
VITE_API_URL: ${VITE_API_URL:-}
# app-dev is served by nginx on the app host; browser API calls must stay
# same-origin and pass through Dockerfile's /__ccapi proxy. The proxy
# strips that prefix before forwarding, preserving mixed backend routes
# such as /api/exam, /me/bootstrap, and /database/timetable.
# .env.dev still points at the LAN API for local Vite/dev tooling.
VITE_API_BASE: /__ccapi
VITE_API_URL: /__ccapi
VITE_APP_NAME: ${VITE_APP_NAME:-Classroom Copilot}
VITE_APP_HMR_URL: ${VITE_APP_HMR_URL:-}
VITE_DEV: ${VITE_DEV:-false}