From aae95591a050ef08ad8210a70b59c05da74f0a9f Mon Sep 17 00:00:00 2001 From: jade Date: Fri, 24 Jul 2026 10:45:27 +0900 Subject: [PATCH] fix: add Nginx SSE proxy configs to prevent buffering of AI streams, and fix Gateway internal routing to use Nginx --- .../src/main/resources/application-dev.yml | 10 ++++---- .../src/main/resources/application.yml | 10 ++++---- nginx/blue.conf | 25 +++++++++++++++++++ nginx/green.conf | 25 +++++++++++++++++++ 4 files changed, 60 insertions(+), 10 deletions(-) diff --git a/dap-gateway/src/main/resources/application-dev.yml b/dap-gateway/src/main/resources/application-dev.yml index b02f64ee..2eb969f7 100644 --- a/dap-gateway/src/main/resources/application-dev.yml +++ b/dap-gateway/src/main/resources/application-dev.yml @@ -10,12 +10,12 @@ mcp: gateway: fallback: - default-url: http://tool-other:8084 + default-url: http://nginx:8284 routes: - sms: http://tool-sms:8082 - email: http://tool-email:8083 - payment: http://tool-payment:8085 - hr: http://tool-other:8084 + sms: http://nginx:8282 + email: http://nginx:8283 + payment: http://nginx:8285 + hr: http://nginx:8284 # --- 신한라이프 EAI/MCI 연계 IP 정보 (개발 환경) --- shinhan: diff --git a/dap-gateway/src/main/resources/application.yml b/dap-gateway/src/main/resources/application.yml index 699ad47b..7f7d3314 100644 --- a/dap-gateway/src/main/resources/application.yml +++ b/dap-gateway/src/main/resources/application.yml @@ -26,12 +26,12 @@ server: mcp: gateway: fallback: - default-url: http://tool-other:8084 + default-url: http://nginx:8284 routes: - sms: http://tool-sms:8082 - email: http://tool-email:8083 - payment: http://tool-payment:8085 - hr: http://tool-hr:8086 + sms: http://nginx:8282 + email: http://nginx:8283 + payment: http://nginx:8285 + hr: http://nginx:8286 agent-claims-required: false trusted-claims-required: false write-approval-required: false diff --git a/nginx/blue.conf b/nginx/blue.conf index 41151918..0c0ace85 100644 --- a/nginx/blue.conf +++ b/nginx/blue.conf @@ -22,6 +22,11 @@ server { listen 8281; location / { proxy_pass http://gateway; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } @@ -31,6 +36,11 @@ server { listen 8282; location / { proxy_pass http://tool-sms; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } @@ -40,6 +50,11 @@ server { listen 8283; location / { proxy_pass http://tool-email; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } @@ -49,6 +64,11 @@ server { listen 8284; location / { proxy_pass http://tool-other; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } @@ -58,6 +78,11 @@ server { listen 8285; location / { proxy_pass http://tool-payment; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } diff --git a/nginx/green.conf b/nginx/green.conf index 6d284831..053500d7 100644 --- a/nginx/green.conf +++ b/nginx/green.conf @@ -22,6 +22,11 @@ server { listen 8281; location / { proxy_pass http://gateway; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } @@ -31,6 +36,11 @@ server { listen 8282; location / { proxy_pass http://tool-sms; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } @@ -40,6 +50,11 @@ server { listen 8283; location / { proxy_pass http://tool-email; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } @@ -49,6 +64,11 @@ server { listen 8284; location / { proxy_pass http://tool-other; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } @@ -58,6 +78,11 @@ server { listen 8285; location / { proxy_pass http://tool-payment; + proxy_http_version 1.1; + proxy_set_header Connection ''; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 86400; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }