mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Removed auth data from websocket connection URL.
This commit is contained in:
parent
4e4ae9cab8
commit
f71c326231
3 changed files with 48 additions and 12 deletions
|
@ -23,9 +23,12 @@ var MeshServerCreateControl = function (domain, authCookie) {
|
|||
if (obj.connectstate != 0) return;
|
||||
obj.connectstate = 0;
|
||||
var url = window.location.protocol.replace('http', 'ws') + '//' + window.location.host + domain + 'control.ashx' + (urlargs.key ? ('?key=' + urlargs.key) : '');
|
||||
if (obj.authCookie && (obj.authCookie != '')) { url += '?auth=' + obj.authCookie; }
|
||||
if (obj.authCookie && (obj.authCookie != '')) {
|
||||
url += '?moreargs=1'
|
||||
//url += '?auth=' + obj.authCookie;
|
||||
}
|
||||
obj.socket = new WebSocket(url);
|
||||
obj.socket.onopen = function (e) { obj.connectstate = 1; }
|
||||
obj.socket.onopen = function (e) { obj.connectstate = 1; if (obj.authCookie && (obj.authCookie != '')) { obj.send({ 'action': 'urlargs', 'args': { 'auth': obj.authCookie } }); } }
|
||||
obj.socket.onmessage = obj.xxOnMessage;
|
||||
obj.socket.onclose = function(e) { obj.Stop(e.code); }
|
||||
obj.xxStateChange(1, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue