Skip to content

Commit 787370e

Browse files
committed
Merge pull request #109 from jnordberg/master
command line tool - make sure targetPort is an integer
2 parents bdf48be + 5ba25aa commit 787370e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/node-http-proxy

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if (typeof target === 'string') location = target.split(':');
6464
//
6565
var server;
6666
if (location) {
67-
var targetPort = location.length === 1 ? 80 : location[1];
67+
var targetPort = location.length === 1 ? 80 : parseInt(location[1]);
6868
server = httpProxy.createServer(targetPort, location[0], config);
6969
}
7070
else if (config.router) {

0 commit comments

Comments
 (0)