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

Fixed web relay connection issue.

This commit is contained in:
Ylian Saint-Hilaire 2020-03-26 23:01:49 -07:00
parent 110cf49b48
commit cbabfab7de
6 changed files with 433 additions and 397 deletions

View file

@ -3810,7 +3810,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
var domain = null;
if (noAuthOk == true) {
domain = getDomain(req);
try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth', msg: 'noauth-1' })); ws.close(); return; } catch (e) { return; }
if (domain == null) { try { ws.send(JSON.stringify({ action: 'close', cause: 'noauth', msg: 'noauth-1' })); ws.close(); return; } catch (e) { } return; }
} else {
// If authentication is required, enforce IP address filtering.
domain = checkUserIpAddress(ws, req);