[Bug] Hardcoded http://localhost:8000 bypasses Nginx reverse proxy #4

Open
opened 2026-10-14 09:44:31 +00:00 by indrajeet · 0 comments

Summary

LoginView.tsx and CallbackView.tsx contain hardcoded calls to http://localhost:8000/api/v1/auth/session.
In docker-compose.prod.yaml, the backend service does not expose port 8000 to the host machine—only frontend is mapped (8080:80).

Impact

Browser requests to http://localhost:8000 fail with ERR_CONNECTION_REFUSED.

Expected Behavior

Frontend API calls should use relative /api/... paths or read import.meta.env.VITE_API_URL || '' so that Nginx reverse-proxies /api/ directly to http://backend:8000/api/.

### Summary `LoginView.tsx` and `CallbackView.tsx` contain hardcoded calls to `http://localhost:8000/api/v1/auth/session`. In `docker-compose.prod.yaml`, the `backend` service does not expose port `8000` to the host machine—only `frontend` is mapped (`8080:80`). ### Impact Browser requests to `http://localhost:8000` fail with `ERR_CONNECTION_REFUSED`. ### Expected Behavior Frontend API calls should use relative `/api/...` paths or read `import.meta.env.VITE_API_URL || ''` so that Nginx reverse-proxies `/api/` directly to `http://backend:8000/api/`.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: prashant/c_agri_trade_code#4
No description provided.