Skip to content

Commit 01fc8e6

Browse files
missing self reference
1 parent 9ed9c82 commit 01fc8e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/proxy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ Proxy.prototype._onWebSocketServerConnect = function(isSSL, ws) {
472472
}
473473
ctx.proxyToServerWebSocketOptions = {
474474
url: url,
475-
agent: ctx.isSSL ? httpsAgent : httpAgent,
475+
agent: ctx.isSSL ? self.httpsAgent : self.httpAgent,
476476
headers: ptosHeaders
477477
};
478478
return self._onWebSocketConnection(ctx, function(err) {
@@ -579,7 +579,7 @@ Proxy.prototype._onHttpServerRequest = function(isSSL, clientToProxyRequest, pro
579579
host: hostPort.host,
580580
port: hostPort.port,
581581
headers: ctx.clientToProxyRequest.headers,
582-
agent: ctx.isSSL ? httpsAgent : httpAgent
582+
agent: ctx.isSSL ? self.httpsAgent : self.httpAgent
583583
};
584584
return self._onRequest(ctx, function(err) {
585585
if (err) {

0 commit comments

Comments
 (0)