mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-11 23:13:21 -05:00
Updated MeshCMD to fix #3234
This commit is contained in:
parent
ef6accd5ac
commit
be104d819c
Binary file not shown.
Binary file not shown.
@ -2039,12 +2039,13 @@ function startRouter() {
|
|||||||
options.headers = { 'host': options.host, 'x-meshauth': Buffer.from(settings.username, 'binary').toString('base64') + ',' + Buffer.from(settings.password, 'binary').toString('base64') };
|
options.headers = { 'host': options.host, 'x-meshauth': Buffer.from(settings.username, 'binary').toString('base64') + ',' + Buffer.from(settings.password, 'binary').toString('base64') };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { options.headers = { 'x-meshauth': '*' }; } // Request inner authentication
|
} else { options.headers = { 'host': options.host, 'x-meshauth': '*' }; } // Request inner authentication
|
||||||
if (settings.loginkey) { xurlargs.push('key=' + settings.loginkey); }
|
if (settings.loginkey) { xurlargs.push('key=' + settings.loginkey); }
|
||||||
if (xurlargs.length > 0) { options.path += '?' + xurlargs.join('&'); }
|
if (xurlargs.length > 0) { options.path += '?' + xurlargs.join('&'); }
|
||||||
} catch (e) { console.log("Unable to parse \"serverUrl\"."); process.exit(1); return; }
|
} catch (e) { console.log("Unable to parse \"serverUrl\"."); process.exit(1); return; }
|
||||||
|
|
||||||
debug(1, "Connecting to " + options.host + ".");
|
debug(1, "Connecting to " + options.host + ".");
|
||||||
|
debug(1, "Connection options: " + JSON.stringify(options) + ".");
|
||||||
options.checkServerIdentity = onVerifyServer;
|
options.checkServerIdentity = onVerifyServer;
|
||||||
options.rejectUnauthorized = false;
|
options.rejectUnauthorized = false;
|
||||||
settings.websocket = http.request(options);
|
settings.websocket = http.request(options);
|
||||||
|
Loading…
Reference in New Issue
Block a user