Add support for hosts with non-standard ports.

This commit is contained in:
Jose Vasconcellos 2016-06-20 21:36:13 -05:00
parent f8b376afe0
commit d26c61c240

View File

@ -26,9 +26,15 @@ monitored_hosts.forEach(get_cert_parameters)
* @param {array} array The
*/
function get_cert_parameters(element, index, array) {
var temp = element.split(':');
var port = 443;
if (temp.length == 2) {
port = parseInt(temp[1]);
element = temp[0];
}
var options = {
hostname: element,
port: 443,
port: port,
method: 'GET'
};