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:
parent
789c5ef185
commit
20c836db0d
3 changed files with 21 additions and 6 deletions
|
@ -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); }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue