Switch frontend container to production-aware runtime mode

This commit is contained in:
2026-03-02 15:41:39 -03:00
parent 0acce2e260
commit b5b74845f2
5 changed files with 30 additions and 1 deletions

View File

@@ -139,9 +139,13 @@ Recommended LIVE pattern:
## Frontend Runtime
- Frontend no longer consumes `VITE_API_TOKEN`.
- Frontend startup mode is environment-driven:
- `APP_ENV=development` runs `vite dev`
- `APP_ENV=production` runs `vite build` then `vite preview`
- Vite dev server host allowlist uses the union of:
- hostnames extracted from `CORS_ORIGINS`
- optional explicit hostnames from `VITE_ALLOWED_HOSTS`
- The same host allowlist policy is applied to both Vite `server` and `preview`.
- Session authentication is cookie-based; browser reloads and new tabs can reuse an active session until it expires or is revoked.
- Protected media and file download flows still use authenticated fetch plus blob/object URL handling.