batchCooking/apps
Nicolas 44e9245a0f fix(web): default API_BASE_URL to same origin, not localhost:3000
Found live on http://batch.dev.kyuno.fr/: every API call went to
http://localhost:3000 in the visitor's own browser instead of the
deployed origin, because API_BASE_URL fell back to a hardcoded
"http://localhost:3000" whenever VITE_API_URL wasn't set at build time
— which is exactly the case for the production Docker image (apps/web/.env
is excluded by .dockerignore, so Vite never sees VITE_API_URL there).

Now defaults to "" (same origin as the page), correct for the merged
single-container deployment where the API serves this very frontend
build. Native dev (pnpm dev:web) is unaffected — apps/web/.env still sets
VITE_API_URL=http://localhost:3000 explicitly there.

Verified: built the Docker image, confirmed "localhost:3000" no longer
appears in the bundled JS, and docker compose up shows /auth/me called
against the container's own origin.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 23:28:24 +02:00
..
api Fusionner web+api en une image, séparer la CI, ajouter la release 2026-08-17 23:11:26 +02:00
web fix(web): default API_BASE_URL to same origin, not localhost:3000 2026-08-17 23:28:24 +02:00