chore(nginx): using header same as the target service
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
eb3aca0ae4
commit
e856982d6d
1 changed files with 7 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue