From f6b132623cdb5947448027ca0ada69a1e5804eaa Mon Sep 17 00:00:00 2001 From: Rodrigo Bertoldo de Sousa Martins Date: Tue, 8 Sep 2026 12:48:49 -0300 Subject: [PATCH] novo fix3 --- nginx/nginx.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index c4ca9da..97d8f45 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -34,7 +34,11 @@ http { location /api/ { set $api_upstream anatomia-api:3333; - proxy_pass http://$api_upstream/api/; + # Sem caminho depois da variável: com proxy_pass "dinâmico" (via + # variável) o nginx não reescreve o prefixo da location — ele só + # repassa a URI original inteira. Como as rotas do Fastify já são + # registradas em /api/..., isso bate certinho sem precisar reescrever. + proxy_pass http://$api_upstream; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -44,7 +48,7 @@ http { location /models/ { set $api_upstream anatomia-api:3333; - proxy_pass http://$api_upstream/models/; + proxy_pass http://$api_upstream; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;