make sure ports are numbers and domain names are lowercase
This commit is contained in:
parent
701aa99a30
commit
d013de932f
|
@ -9,11 +9,11 @@ var stunneld = require('../wstunneld.js');
|
||||||
var greenlock = require('greenlock');
|
var greenlock = require('greenlock');
|
||||||
|
|
||||||
function collectServernames(val, memo) {
|
function collectServernames(val, memo) {
|
||||||
val.split(/,/).forEach(function (servername) {
|
var lowerCase = val.split(/,/).map(function (servername) {
|
||||||
memo.push(servername.toLowerCase());
|
return servername.toLowerCase();
|
||||||
});
|
});
|
||||||
|
|
||||||
return memo;
|
return memo.concat(lowerCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
function collectProxies(val, memo) {
|
function collectProxies(val, memo) {
|
||||||
|
@ -65,8 +65,7 @@ function collectProxies(val, memo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function collectPorts(val, memo) {
|
function collectPorts(val, memo) {
|
||||||
memo = memo.concat(val.split(/,/g).filter(Boolean));
|
return memo.concat(val.split(/,/g).map(Number).filter(Boolean));
|
||||||
return memo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
program
|
program
|
||||||
|
|
Loading…
Reference in New Issue