Fix: Proxy to Docker bridge gateway (172.17.0.1) so frontend can reach backend

This commit is contained in:
test
2025-11-30 19:25:16 +05:30
parent e07af65f67
commit eecc3ad9e2

View File

@@ -59,7 +59,9 @@ http {
# Proxy API calls to backend
location /api {
proxy_pass http://127.0.0.1:3001;
# Use Docker bridge gateway so container can reach host's backend
# 172.17.0.1 is the common Docker bridge gateway; adjust if different
proxy_pass http://172.17.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';