diff --git a/nginx.conf b/nginx.conf index 3c6810b..00af264 100644 --- a/nginx.conf +++ b/nginx.conf @@ -9,14 +9,24 @@ server { location /api/be { proxy_pass http://${BE_HOST}:${BE_PORT}/; + proxy_set_header X-Forwarded-Prefix /api/be; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; } + location /api/rec { proxy_pass http://${REC_HOST}:${REC_PORT}/; + proxy_set_header X-Forwarded-Prefix /api/rec; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } - }