@@ -9,7 +9,7 @@ var defaultLogger = require("./log").defaultLogger;
99
1010var servers = [ ] ;
1111
12- var addTarget = ( exports . addTarget = function ( proxy , path , port , websocket , targetPath ) {
12+ function addTarget ( proxy , path , port , websocket , targetPath ) {
1313 var target = "http://127.0.0.1:" + port ;
1414 if ( targetPath ) {
1515 target = target + targetPath ;
@@ -48,15 +48,11 @@ var addTarget = (exports.addTarget = function (proxy, path, port, websocket, tar
4848 // so that activity can more easily be measured
4949 return proxy . _routes . update ( path , { last_activity : proxy . _setup_timestamp } ) ;
5050 } ) ;
51- } ) ;
52-
53- var addTargetRedirecting = ( exports . addTargetRedirecting = function (
54- proxy ,
55- path ,
56- port ,
57- targetPath ,
58- redirectTo
59- ) {
51+ }
52+
53+ exports . addTarget = addTarget ;
54+
55+ exports . addTargetRedirecting = function ( proxy , path , port , targetPath , redirectTo ) {
6056 // Like the above, but the server returns a redirect response with a Location header.
6157 // Cannot use default arguments as they are apparently not supported.
6258 var target = "http://127.0.0.1:" + port ;
@@ -75,7 +71,7 @@ var addTargetRedirecting = (exports.addTargetRedirecting = function (
7571 server . listen ( port ) ;
7672 servers . push ( server ) ;
7773 } ) ;
78- } ) ;
74+ } ;
7975
8076function addTargets ( proxy , paths , port ) {
8177 if ( paths . length === 0 ) {
0 commit comments