From b3b0b194a32678d7188a8f4ede3f089b043eba2f Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Sun, 26 Oct 2025 14:25:09 +0800 Subject: [PATCH] Configure MCP port and nginx proxies --- .env.example | 1 + nginx/openisle | 22 +++++++++++++++++++++- nginx/openisle-staging | 20 ++++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index e042d515b..b65449ea9 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,7 @@ SERVER_PORT=8080 FRONTEND_PORT=3000 WEBSOCKET_PORT=8082 +OPENISLE_MCP_PORT=8085 MYSQL_PORT=3306 REDIS_PORT=6379 RABBITMQ_PORT=5672 diff --git a/nginx/openisle b/nginx/openisle index ff9e71ed8..fb523acdc 100644 --- a/nginx/openisle +++ b/nginx/openisle @@ -101,7 +101,27 @@ server { } location ^~ /websocket/ { - proxy_pass http://127.0.0.1:8084/; + proxy_pass http://127.0.0.1:8084/; + proxy_http_version 1.1; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + 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_set_header X-Forwarded-Host $host; + + proxy_read_timeout 300s; + proxy_send_timeout 300s; + proxy_buffering off; + proxy_cache off; + add_header Cache-Control "no-store" always; + } + + location ^~ /mcp/ { + proxy_pass http://127.0.0.1:8085/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/nginx/openisle-staging b/nginx/openisle-staging index dd1c906c4..ef5d014c9 100644 --- a/nginx/openisle-staging +++ b/nginx/openisle-staging @@ -80,4 +80,24 @@ server { add_header Cache-Control "no-store" always; } + location ^~ /mcp/ { + proxy_pass http://127.0.0.1:8086/; + proxy_http_version 1.1; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + 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_set_header X-Forwarded-Host $host; + + proxy_read_timeout 300s; + proxy_send_timeout 300s; + proxy_buffering off; + proxy_cache off; + add_header Cache-Control "no-store" always; + } + }