Skip to content

Commit c9cd6d2

Browse files
committed
[fix] make @mmalecki a happy camper
1 parent 1993faf commit c9cd6d2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Diff for: lib/caronte.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ proxy.createProxyServer = function createProxyServer(options) {
5151
options.ee = new events.EventEmitter2({ wildcard: true, delimiter: ':' });
5252

5353
return {
54+
ee : options.ee,
5455
web : caronte.createWebProxy(options),
5556
ws : caronte.createWsProxy(options),
5657
listen : function listen(port) {
@@ -63,9 +64,6 @@ proxy.createProxyServer = function createProxyServer(options) {
6364
server.listen(port);
6465

6566
return server;
66-
},
67-
emitter : function() {
68-
return options.ee;
6967
}
7068
};
7169
};

Diff for: lib/caronte/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ function createRightProxy(type) {
3030
return passes[pass];
3131
});
3232

33-
return function(req, res) {
33+
return function(req, res, opts) {
3434
var self = this,
3535
ev = 'caronte:' + type + ':';
36+
37+
if(typeof opts !== 'undefined') { options = opts; }
38+
3639
options.ee.emit(ev + 'begin', req, res);
3740

3841

0 commit comments

Comments
 (0)