We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8305361 commit e2165acCopy full SHA for e2165ac
lib/proxy.js
@@ -68,7 +68,10 @@ Proxy.prototype.listen = function(options, callback) {
68
self.httpServer.on('request', self._onHttpServerRequest.bind(self, false));
69
self.wsServer = new WebSocket.Server({ server: self.httpServer });
70
self.wsServer.on('error', self._onError.bind(self, 'HTTP_SERVER_ERROR', null));
71
- self.wsServer.on('connection', self._onWebSocketServerConnect.bind(self, false));
+ self.wsServer.on('connection', (ws, req) => {
72
+ ws.upgradeReq = req;
73
+ self._onWebSocketServerConnect.bind(self, false);
74
+ });
75
const listenOptions = {
76
host: self.httpHost,
77
port: self.httpPort
0 commit comments