Configure Vite dev proxy via VITE_BACKEND_URL
This commit is contained in:
2
frontend/.env.example
Normal file
2
frontend/.env.example
Normal file
@@ -0,0 +1,2 @@
|
||||
# Local frontend development without Docker
|
||||
VITE_BACKEND_URL=http://localhost:8000
|
||||
@@ -30,7 +30,7 @@ export default defineConfig({
|
||||
// In the dev compose stack the backend is reachable via its service
|
||||
// name on the shared Docker/Podman network. Using "localhost" would
|
||||
// resolve to the frontend container itself and cause ECONNREFUSED.
|
||||
target: "http://backend:8000",
|
||||
target: process.env["VITE_BACKEND_URL"] ?? "http://backend:8000",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user