diff --git a/scripts/dockerfiles/nginx/location.list b/scripts/dockerfiles/nginx/location.list index 2ffc4329a..ef6b7841f 100644 --- a/scripts/dockerfiles/nginx/location.list +++ b/scripts/dockerfiles/nginx/location.list @@ -6,12 +6,13 @@ location /healthz { } location /api/ { set $target $api_endpoint; + rewrite ^/api/(.*) /$1 break; + proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass $target; } location / { @@ -23,6 +24,9 @@ location / { proxy_intercept_errors on; # see frontend://nginx.org/en/docs/frontend/ngx_frontend_proxy_module.html#proxy_intercept_errors error_page 404 =200 /index.html; - proxy_set_header Host $http_host; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass $target; }