From 5180fc781dc5866aa2630d00fadd1af2f54537e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=E5=85=88=E7=94=9F?= <1211120248@qq.com> Date: Sat, 15 Aug 2026 16:23:05 +0800 Subject: [PATCH] fix: proxy Magic API debug websocket --- nginx-main.conf | 4 ++++ nginx.conf | 2 ++ 2 files changed, 6 insertions(+) diff --git a/nginx-main.conf b/nginx-main.conf index aad6792..f3469fd 100644 --- a/nginx-main.conf +++ b/nginx-main.conf @@ -33,6 +33,10 @@ stream { http { include /etc/nginx/mime.types; default_type application/octet-stream; + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; diff --git a/nginx.conf b/nginx.conf index fdcf4cb..c27f062 100644 --- a/nginx.conf +++ b/nginx.conf @@ -57,6 +57,8 @@ server { proxy_pass http://hy-v3-openapi:9999; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; proxy_connect_timeout 5s; proxy_read_timeout 30s; }