diff --git a/lib/caronte/index.js b/lib/caronte/index.js index 214de97..86b79a4 100644 --- a/lib/caronte/index.js +++ b/lib/caronte/index.js @@ -57,14 +57,13 @@ function createRightProxy(type) { options.ee.emit(ev + 'begin', req, res); - ['target', 'forward'].forEach( - function(e) { - if (typeof options[e] === 'string') - options[e] = parse_url(options[e]); + ['target', 'forward'].forEach(function(e) { + if (typeof options[e] === 'string') + options[e] = parse_url(options[e]); }); passes.some(function(pass) { - var evnt = ev + pass.name.toLowerCase() + ':'; + var evnt = ev + pass.name.toLowerCase() + ':', val; /** * Call of passes functions @@ -76,7 +75,7 @@ function createRightProxy(type) { */ options.ee.emit(evnt + 'begin', req, res); - var val = pass(req, res, options, head); + val = pass(req, res, options, head); options.ee.emit(evnt + 'end'); return val;