fix(nginx): preserve query string for Socket.IO proxy
Add $is_args$args to proxy_pass for /socket.io/ and /ws/ locations to fix "Transport unknown" error caused by missing query parameters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
92e2b7e445
commit
ec66d58e61
|
|
@ -13,7 +13,8 @@
|
||||||
"Bash(git push:*)",
|
"Bash(git push:*)",
|
||||||
"Bash(docker compose:*)",
|
"Bash(docker compose:*)",
|
||||||
"Bash(ssh:*)",
|
"Bash(ssh:*)",
|
||||||
"Bash(ping:*)"
|
"Bash(ping:*)",
|
||||||
|
"Bash(curl:*)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ server {
|
||||||
# WebSocket 代理
|
# WebSocket 代理
|
||||||
location /ws/ {
|
location /ws/ {
|
||||||
set $ws_upstream conversation-service:3004;
|
set $ws_upstream conversation-service:3004;
|
||||||
proxy_pass http://$ws_upstream/;
|
proxy_pass http://$ws_upstream/$is_args$args;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
@ -92,7 +92,7 @@ server {
|
||||||
# Socket.IO 专用路径
|
# Socket.IO 专用路径
|
||||||
location /socket.io/ {
|
location /socket.io/ {
|
||||||
set $ws_upstream conversation-service:3004;
|
set $ws_upstream conversation-service:3004;
|
||||||
proxy_pass http://$ws_upstream/socket.io/;
|
proxy_pass http://$ws_upstream/socket.io/$is_args$args;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue