File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,6 @@ proxy.createProxyServer = proxy.createServer = function createProxyServer(option
39
39
].join("\n"));
40
40
} */
41
41
42
- return new ProxyServer ( options , httpProxy . createWebProxy ( options ) , httpProxy . createWsProxy ( options ) ) ;
42
+ return new ProxyServer ( options ) ;
43
43
} ;
44
44
Original file line number Diff line number Diff line change @@ -4,10 +4,8 @@ var httpProxy = exports,
4
4
EE3 = require ( 'eventemitter3' ) . EventEmitter ,
5
5
web = require ( './passes/web-incoming' ) ,
6
6
ws = require ( './passes/ws-incoming' ) ;
7
-
8
- httpProxy . createWebProxy = createRightProxy ( 'web' ) ;
9
- httpProxy . createWsProxy = createRightProxy ( 'ws' ) ;
10
- httpProxy . Server = ProxyServer ;
7
+
8
+ httpProxy . Server = ProxyServer ;
11
9
12
10
/**
13
11
* Returns a function that creates the loader for
@@ -89,11 +87,11 @@ function createRightProxy(type) {
89
87
}
90
88
91
89
92
- function ProxyServer ( options , web , ws ) {
90
+ function ProxyServer ( options ) {
93
91
EE3 . call ( this ) ;
94
92
95
- this . web = web ;
96
- this . ws = ws ;
93
+ this . web = createRightProxy ( ' web' ) ( options ) ;
94
+ this . ws = reateRightProxy ( 'ws' ) ( options ) ;
97
95
this . options = options ;
98
96
99
97
this . passes = Object . keys ( passes ) . map ( function ( pass ) {
You can’t perform that action at this time.
0 commit comments