Skip to content

Commit 8a88774

Browse files
committed
[fix] Convert strings to numbers if possible in .createServer
Fixes #321
1 parent b8c27ed commit 8a88774

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/node-http-proxy.js

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ exports.createServer = function () {
7474
// **NEED MORE HERE!!!**
7575
//
7676
args.forEach(function (arg) {
77+
arg = Number(arg) || arg;
7778
switch (typeof arg) {
7879
case 'string': host = arg; break;
7980
case 'number': port = arg; break;

0 commit comments

Comments
 (0)