mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Make sure the target port is an integer
This fixes a bug that caused cli to fail when --target was specified with both hostname and port
This commit is contained in:
parent
bdf48bea36
commit
5ba25aa345
@ -64,7 +64,7 @@ if (typeof target === 'string') location = target.split(':');
|
||||
//
|
||||
var server;
|
||||
if (location) {
|
||||
var targetPort = location.length === 1 ? 80 : location[1];
|
||||
var targetPort = location.length === 1 ? 80 : parseInt(location[1]);
|
||||
server = httpProxy.createServer(targetPort, location[0], config);
|
||||
}
|
||||
else if (config.router) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user