mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] Dont use res.* in proxyWebSocketRequest
This commit is contained in:
parent
f0917a3f97
commit
f7452bc42d
@ -636,8 +636,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
|
||||
location = this.proxyTable.getProxyLocation(req);
|
||||
|
||||
if (!location) {
|
||||
res.writeHead(404);
|
||||
return res.end();
|
||||
return socket.destroy();
|
||||
}
|
||||
|
||||
options.port = location.port;
|
||||
@ -786,6 +785,7 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
|
||||
path: req.url,
|
||||
headers: req.headers,
|
||||
};
|
||||
|
||||
var reverseProxy = agent.appendMessage(outgoing);
|
||||
|
||||
//
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user