chimurai / http-proxy-middleware

:zap: The one-liner node.js http-proxy middleware for connect, express, next.js and more
MIT License
10.76k stars 849 forks source link

sometime "WebSocket is closed before the connection is established" when proxy for websocket #669

Open quicklearning123 opened 3 years ago

quicklearning123 commented 3 years ago

yarn why http-proxy-middleware OR npm ls http-proxy-middleware output (mask private folder names with *****)

── http-proxy-middleware@1.0.6

Describe the bug (be clear and concise)

I user eggjs with http-proxy-middleware, and add a proxy for websocket request. But I get a error "WebSocket is closed before the connection is established" sometime.

Step-by-step reproduction instructions

I have no idea about how to get a reproduction.

Expected behavior (be clear and concise)

send and recv successfully every time

What http-proxy-middleware configuration are you using?

ws:true

What OS/version and node/version are you seeing the problem?

node:14.7
mac os

Additional context (optional)

Everything goes well before add the proxy of websocket

No response

quicklearning123 commented 2 years ago

Is there anyone know the reason

tinystorm commented 2 years ago

what's your mac os version?