batchCooking/apps/web/src
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 fix(web): default API_BASE_URL to same origin, not localhost:3000 2026-08-17 23:28:24 +02:00
features Tests: dates fixes pour Planning + refonte des radio/checkbox 2026-08-17 22:36:02 +02:00
i18n Centralize error handling + code quality pass (comments, SCSS theming) (#7) 2026-08-16 18:40:53 +02:00
layouts Web: sidebar avec icônes + repli/déploiement 2026-08-17 16:16:42 +02:00
lib Centralize error handling + code quality pass (comments, SCSS theming) (#7) 2026-08-16 18:40:53 +02:00
locales/fr Web: sidebar avec icônes + repli/déploiement 2026-08-17 16:16:42 +02:00
pages Tests: dates fixes pour Planning + refonte des radio/checkbox 2026-08-17 22:36:02 +02:00
services Centralize error handling + code quality pass (comments, SCSS theming) (#7) 2026-08-16 18:40:53 +02:00
styles Tests: dates fixes pour Planning + refonte des radio/checkbox 2026-08-17 22:36:02 +02:00
App.tsx Web: UserPreferencesPage (thème) + renommage "Préférences alimentaires" (step 3/4) 2026-08-17 15:56:12 +02:00
main.tsx Web: UserPreferencesPage (thème) + renommage "Préférences alimentaires" (step 3/4) 2026-08-17 15:56:12 +02:00