File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ proxy.createProxyServer = function createProxyServer(options) {
51
51
options . ee = new events . EventEmitter2 ( { wildcard : true , delimiter : ':' } ) ;
52
52
53
53
return {
54
+ ee : options . ee ,
54
55
web : caronte . createWebProxy ( options ) ,
55
56
ws : caronte . createWsProxy ( options ) ,
56
57
listen : function listen ( port ) {
@@ -63,9 +64,6 @@ proxy.createProxyServer = function createProxyServer(options) {
63
64
server . listen ( port ) ;
64
65
65
66
return server ;
66
- } ,
67
- emitter : function ( ) {
68
- return options . ee ;
69
67
}
70
68
} ;
71
69
} ;
Original file line number Diff line number Diff line change @@ -30,9 +30,12 @@ function createRightProxy(type) {
30
30
return passes [ pass ] ;
31
31
} ) ;
32
32
33
- return function ( req , res ) {
33
+ return function ( req , res , opts ) {
34
34
var self = this ,
35
35
ev = 'caronte:' + type + ':' ;
36
+
37
+ if ( typeof opts !== 'undefined' ) { options = opts ; }
38
+
36
39
options . ee . emit ( ev + 'begin' , req , res ) ;
37
40
38
41
You can’t perform that action at this time.
0 commit comments