mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] Convert strings to numbers if possible in .createServer
Fixes #321
This commit is contained in:
parent
b8c27ed565
commit
8a88774ecf
@ -74,6 +74,7 @@ exports.createServer = function () {
|
||||
// **NEED MORE HERE!!!**
|
||||
//
|
||||
args.forEach(function (arg) {
|
||||
arg = Number(arg) || arg;
|
||||
switch (typeof arg) {
|
||||
case 'string': host = arg; break;
|
||||
case 'number': port = arg; break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user