refactor(api): add same-origin backend proxy for auth cookies

This commit is contained in:
2026-07-22 16:18:17 +05:30
parent e077467bce
commit 5d3dac0b21
4 changed files with 23 additions and 16 deletions

View File

@@ -1,2 +1,5 @@
# Backend API base URL (no trailing slash)
NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
# Server-only backend origin. Do not expose this as a NEXT_PUBLIC variable.
BACKEND_ORIGIN=http://localhost:8000
# Browser requests stay on the Next.js origin and are rewritten server-side.
NEXT_PUBLIC_API_URL=/backend/