mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed refresh.ashx reload loop, added user consent strings to config.json.
This commit is contained in:
parent
2156b27db2
commit
f8604d5b61
7 changed files with 68 additions and 25 deletions
|
@ -802,15 +802,18 @@
|
|||
if (args.webrtc != null) { attemptWebRTC = (args.webrtc == 1); }
|
||||
|
||||
// Session Refresh Timer
|
||||
sessionRefreshTimer = setInterval(function () {
|
||||
var xdr = null;
|
||||
try { xdr = new XDomainRequest(); } catch (e) { }
|
||||
if (!xdr) xdr = new XMLHttpRequest();
|
||||
xdr.open('GET', window.location.origin + domainUrl + 'refresh.ashx');
|
||||
xdr.timeout = 15000;
|
||||
xdr.onload = xdr.onerror = xdr.ontimeout = function () { };
|
||||
xdr.send();
|
||||
}, Math.round((sessionTime * 60000) * 0.8))
|
||||
if (sessionTime >= 10) { sessionRefreshTimer = setTimeout(refreshCookieSession, Math.round((sessionTime * 60000) * 0.8)); }
|
||||
}
|
||||
|
||||
function refreshCookieSession() {
|
||||
var xdr = null;
|
||||
try { xdr = new XDomainRequest(); } catch (e) { }
|
||||
if (!xdr) xdr = new XMLHttpRequest();
|
||||
xdr.open('GET', window.location.origin + domainUrl + 'refresh.ashx');
|
||||
xdr.timeout = 15000;
|
||||
xdr.onload = function () { sessionRefreshTimer = setTimeout(refreshCookieSession, Math.round((sessionTime * 60000) * 0.8)); };
|
||||
xdr.onerror = xdr.ontimeout = function () { sessionRefreshTimer = null; };
|
||||
xdr.send();
|
||||
}
|
||||
|
||||
function onStateChanged(server, state, prevState, errorCode) {
|
||||
|
|
|
@ -1422,15 +1422,18 @@
|
|||
}
|
||||
|
||||
// Session Refresh Timer
|
||||
sessionRefreshTimer = setInterval(function () {
|
||||
var xdr = null;
|
||||
try { xdr = new XDomainRequest(); } catch (e) { }
|
||||
if (!xdr) xdr = new XMLHttpRequest();
|
||||
xdr.open('GET', window.location.origin + domainUrl + 'refresh.ashx');
|
||||
xdr.timeout = 15000;
|
||||
xdr.onload = xdr.onerror = xdr.ontimeout = function () { };
|
||||
xdr.send();
|
||||
}, Math.round((sessionTime * 60000) * 0.8))
|
||||
if (sessionTime >= 10) { sessionRefreshTimer = setTimeout(refreshCookieSession, Math.round((sessionTime * 60000) * 0.8)); }
|
||||
}
|
||||
|
||||
function refreshCookieSession() {
|
||||
var xdr = null;
|
||||
try { xdr = new XDomainRequest(); } catch (e) { }
|
||||
if (!xdr) xdr = new XMLHttpRequest();
|
||||
xdr.open('GET', window.location.origin + domainUrl + 'refresh.ashx');
|
||||
xdr.timeout = 15000;
|
||||
xdr.onload = function () { sessionRefreshTimer = setTimeout(refreshCookieSession, Math.round((sessionTime * 60000) * 0.8)); };
|
||||
xdr.onerror = xdr.ontimeout = function () { sessionRefreshTimer = null; };
|
||||
xdr.send();
|
||||
}
|
||||
|
||||
// Generic handling of custom actions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue