From ff8e01173b0970073b7875d98e1b3ae1672996a4 Mon Sep 17 00:00:00 2001 From: Sergio Nicolas Lavaise Date: Fri, 24 Apr 2026 18:45:32 -0300 Subject: [PATCH] Use relative API path via nginx --- .env | 2 +- nginx.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index df940cd..0bf5ede 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -VITE_API_URL=http://10.9.8.201:4000/api \ No newline at end of file +VITE_API_URL=/api \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index 369311a..73bb4b7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,10 +1,10 @@ server { listen 80; - server_name localhost; + server_name _; root /usr/share/nginx/html; index index.html; - # Proxy API requests to backend + # Proxy all API requests to backend location /api/ { proxy_pass http://127.0.0.1:4000/api/; proxy_http_version 1.1;