Update Nginx configuration to use a unique backend hostname for API routing to prevent intermittent routing issues
This commit is contained in:
@@ -13,7 +13,11 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
set $backend http://server:3000;
|
# Use a globally-unique hostname across attached Docker networks.
|
||||||
|
# `client` is connected to both `toir-light` and external `proxy` networks,
|
||||||
|
# so a generic name like `server` can resolve to multiple containers and
|
||||||
|
# cause intermittent routing (200/404 flapping).
|
||||||
|
set $backend http://toir-light-server:3000;
|
||||||
proxy_pass $backend;
|
proxy_pass $backend;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|||||||
Reference in New Issue
Block a user