Fix: Proxy to Docker bridge gateway (172.17.0.1) so frontend can reach backend
This commit is contained in:
@@ -59,7 +59,9 @@ http {
|
|||||||
|
|
||||||
# Proxy API calls to backend
|
# Proxy API calls to backend
|
||||||
location /api {
|
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_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection 'upgrade';
|
proxy_set_header Connection 'upgrade';
|
||||||
|
|||||||
Reference in New Issue
Block a user