1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added multi-interface mesh server scanner

This commit is contained in:
Ylian Saint-Hilaire 2017-09-04 12:20:18 -07:00
parent 789c5ef185
commit 20c836db0d
3 changed files with 21 additions and 6 deletions

View file

@ -22,7 +22,7 @@ module.exports.CreateRedirServer = function (parent, db, args, certificates) {
// Perform an HTTP to HTTPS redirection
function performRedirection(req, res) {
var host = certificates.CommonName;
if (certificates.CommonName == 'sample.org') { host = req.headers.host; }
if ((certificates.CommonName == 'sample.org') || (certificates.CommonName == 'un-configured')) { host = req.headers.host; }
if (req.headers && req.headers.host && (req.headers.host.split(':')[0].toLowerCase() == 'localhost')) { res.redirect('https://localhost:' + args.port + req.url); } else { res.redirect('https://' + host + ':' + args.port + req.url); }
}