File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ proxy.createProxyServer = function createProxyServer(options) {
32
32
" ws : <true/false, if you want to proxy websockets> " ,
33
33
" xfwd : <true/false, adds x-forward headers> " ,
34
34
" maxSock: <maximum number of sockets> " ,
35
+ " agent : <http agent for pooled connections> " ,
35
36
" } " ,
36
37
" " ,
37
38
"NOTE: `options.ws` and `options.ssl` are optional. " ,
@@ -45,7 +46,7 @@ proxy.createProxyServer = function createProxyServer(options) {
45
46
options [ key ] = url . parse ( options [ key ] ) ;
46
47
47
48
options [ key ] . maxSockets = options . maxSock ;
48
- options [ key ] . agent = new ( options . ssl ? https . Agent : http . Agent ) ( options [ key ] . maxSockets || 100 ) ;
49
+ options [ key ] . agent = options . agent || false // new (options.ssl ? https.Agent : http.Agent)(options[key].maxSockets || 100);
49
50
} ) ;
50
51
51
52
options . ee = new events . EventEmitter2 ( { wildcard : true , delimiter : ':' } ) ;
You can’t perform that action at this time.
0 commit comments