Open
Description
yarn why http-proxy-middleware
OR npm ls http-proxy-middleware
output (mask private folder names with *****)
- I understand project setup issues should be asked on StackOverflow or in GitHub Discussions.
- I updated to latest
http-proxy-middleware
.
Describe the bug (be clear and concise)
If I proxy ws
Set the callback with CreateProxyMiddleware
{
onClose: function (){
console.log("onClose");
},
onProxyReqWs: function(){
console.log("onProxyReqWs");
},
onOpen: function(){
console.log("onOpen");
}
}
can receive many onProxyReqWs and onOpen but only receive one onClose event.
and the result is Socket object will leak, memory increase。
Step-by-step reproduction instructions
1. ...
2. ...
Expected behavior (be clear and concise)
...
What http-proxy-middleware configuration are you using?
function GetProxyParam(){
var reg = `^/${Config.http_stream_port}`;
var rewrite = {};
rewrite[reg] = "";
return {
target: `http://localhost:${Config.http_stream_port}`,
changeOrigin: true,
ws: true,
logLevel: "debug",
pathRewrite: rewrite,
onClose: function (){
console.log("onClose");
},
onProxyReqWs: function(){
console.log("onProxyReqWs");
},
onOpen: function(){
console.log("onOpen");
}
}
}
What OS/version and node/version are you seeing the problem?
windows node v12.20.1
Additional context (optional)
...