From 7f8b603be6d4142326e9f87fa40bd3e39580b508 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Auad Date: Wed, 15 Jul 2026 16:50:47 +0000 Subject: [PATCH] Agregado ruteo nginx para las transformaciones de bundle ($ddcc/$dvc/$icvp2/$meow) Las rutas GET /fhir/Bundle/:id/\$ddcc|\$dvc|\$icvp2|\$meow, implementadas en bus-gateway/controllers/bundleSigner.js, no tenian ningun location que las mandara a bus-gateway: caian todas al catch-all /fhir/ y terminaban en hapi-fhir, que no las entiende. Se agrega un location por regex que las matchea especificamente y las deja pasar a bus_gateway, sin afectar el resto de rutas /fhir/Bundle/:id. Co-Authored-By: Claude Sonnet 5 --- nginx/http.conf | 11 +++++++++++ nginx/https.conf | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/nginx/http.conf b/nginx/http.conf index d526c8d..652b33c 100644 --- a/nginx/http.conf +++ b/nginx/http.conf @@ -96,6 +96,17 @@ http { proxy_read_timeout 90s; } + # Transformaciones de bundle (nodo nacional, via bus-gateway/bundleSigner): + # /fhir/Bundle/:id/$ddcc, $dvc, $icvp2, $meow + location ~ ^/fhir/Bundle/[^/]+/\$(ddcc|dvc|icvp2|meow)$ { + proxy_pass http://bus_gateway; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 90s; + } + # Resto de /fhir/* va a hapi-fhir location /fhir/ { proxy_pass http://hapi_fhir; diff --git a/nginx/https.conf b/nginx/https.conf index 338d8e9..1ffe9b2 100644 --- a/nginx/https.conf +++ b/nginx/https.conf @@ -112,6 +112,17 @@ http { proxy_read_timeout 90s; } + # Transformaciones de bundle (nodo nacional, via bus-gateway/bundleSigner): + # /fhir/Bundle/:id/$ddcc, $dvc, $icvp2, $meow + location ~ ^/fhir/Bundle/[^/]+/\$(ddcc|dvc|icvp2|meow)$ { + proxy_pass http://bus_gateway; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 90s; + } + # Resto de /fhir/* va a hapi-fhir location /fhir/ { proxy_pass http://hapi_fhir;