Update Nginx configuration to use a unique backend hostname for API routing to prevent intermittent routing issues

This commit is contained in:
Первов Артем
2026-04-20 23:35:45 +03:00
parent 420e1deb7d
commit 62446f2597

View File

@@ -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;