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

Added basic auth.log support.

This commit is contained in:
Ylian Saint-Hilaire 2020-02-17 10:24:32 -08:00
parent 2f4033ac07
commit d55c6b3072
5 changed files with 38 additions and 6 deletions

View file

@ -127,10 +127,11 @@ module.exports.CreateRedirServer = function (parent, db, args, func) {
obj.tcpServer = obj.app.listen(port, function () {
obj.port = port;
console.log("MeshCentral HTTP redirection server running on port " + port + ".");
obj.parent.updateServerState("redirect-port", port);
obj.parent.authLog('http', 'Server listening on 0.0.0.0 port ' + port + '.');
obj.parent.updateServerState('redirect-port', port);
func(obj.port);
}).on("error", function (err) {
if ((err.code == "EACCES") && (port < 65535)) { StartRedirServer(port + 1); } else { console.log(err); func(obj.port); }
}).on('error', function (err) {
if ((err.code == 'EACCES') && (port < 65535)) { StartRedirServer(port + 1); } else { console.log(err); func(obj.port); }
});
}