🔥 refactor(nginx.conf): remove redundant code for proxying /api/v1/ and /health routes to backend service
This commit is contained in:
parent
bff329e278
commit
9baf588e5e
1 changed files with 1 additions and 16 deletions
|
|
@ -15,21 +15,6 @@ server {
|
||||||
try_files $uri $uri/ /index.html =404;
|
try_files $uri $uri/ /index.html =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/api/v1/ { # Matching the /api/v1/ route
|
|
||||||
proxy_pass __BACKEND_URL__; # URL of your backend service
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection 'upgrade';
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_cache_bypass $http_upgrade;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /health { # Matching the /health route
|
include /etc/nginx/extra-conf.d/*.conf;
|
||||||
proxy_pass __BACKEND_URL__; # URL of your backend service
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection 'upgrade';
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_cache_bypass $http_upgrade;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue