Skip to content

Commit

Permalink
ENH: updated target and forward options so that a string may be speci…
Browse files Browse the repository at this point in the history
…fied
  • Loading branch information
srossross committed Sep 16, 2013
1 parent 268afe3 commit ef946a7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/caronte/index.js
@@ -1,5 +1,6 @@
var caronte = exports,
extend = require('util')._extend,
parse_url = require('url').parse,
web = require('./passes/web-incoming'),
ws = require('./passes/ws-incoming');

Expand Down Expand Up @@ -56,7 +57,12 @@ 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]);
});

passes.some(function(pass) {
var evnt = ev + pass.name.toLowerCase() + ':';

Expand Down

0 comments on commit ef946a7

Please sign in to comment.