diff --git a/nginx/nginx.conf b/nginx/nginx.conf index b256b57..7ecc149 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -22,19 +22,10 @@ http { # Route /api requests to the backend service location /api { - rewrite /api/(.*) /$1 break; - proxy_pass http://backend; - proxy_set_header Host $host; + proxy_pass http://backend/api; proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - } - - location /sockjs-node { - proxy_pass http://frontend; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; } # Serve frontend for all other routes @@ -46,9 +37,5 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } - # You may need this to prevent return 404 recursion. - # location = /404.html { - # internal; - # } } }