batchCooking/apps/web
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
..
cypress Tests: couverture Cypress pour le repli/déploiement de la sidebar 2026-08-17 16:17:06 +02:00
src fix(web): default API_BASE_URL to same origin, not localhost:3000 2026-08-17 23:28:24 +02:00
.env.example Login/signup UI (apps/web) (#6) 2026-08-16 15:21:40 +02:00
cypress.config.ts Scaffold generic pnpm monorepo (api + web + shared) (#1) 2026-08-16 10:55:13 +02:00
index.html Scaffold generic pnpm monorepo (api + web + shared) (#1) 2026-08-16 10:55:13 +02:00
package.json Web: PlanningPage — grille hebdomadaire + navigation semaine (step 3/4) 2026-08-17 14:19:16 +02:00
tsconfig.app.json Centralize error handling + code quality pass (comments, SCSS theming) (#7) 2026-08-16 18:40:53 +02:00
tsconfig.json Scaffold generic pnpm monorepo (api + web + shared) (#1) 2026-08-16 10:55:13 +02:00
tsconfig.node.json Scaffold generic pnpm monorepo (api + web + shared) (#1) 2026-08-16 10:55:13 +02:00
vite.config.ts Centralize error handling + code quality pass (comments, SCSS theming) (#7) 2026-08-16 18:40:53 +02:00