Use relative API path via nginx

This commit is contained in:
2026-04-24 18:45:32 -03:00
parent 99d85c96e5
commit ff8e01173b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
VITE_API_URL=http://10.9.8.201:4000/api VITE_API_URL=/api
+2 -2
View File
@@ -1,10 +1,10 @@
server { server {
listen 80; listen 80;
server_name localhost; server_name _;
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
# Proxy API requests to backend # Proxy all API requests to backend
location /api/ { location /api/ {
proxy_pass http://127.0.0.1:4000/api/; proxy_pass http://127.0.0.1:4000/api/;
proxy_http_version 1.1; proxy_http_version 1.1;