diff --git a/agents/modules_meshcmd/amt.js b/agents/modules_meshcmd/amt.js index e99e54a6..2b06389b 100644 --- a/agents/modules_meshcmd/amt.js +++ b/agents/modules_meshcmd/amt.js @@ -488,7 +488,7 @@ function AmtStackCreateService(wsmanStack) { function _GetMessageLog1(stack, name, responses, status, tag) { if (status != 200 || responses.Body["ReturnValue"] != '0') { tag[0](obj, null, tag[2], status); return; } var i, j, x, e, AmtMessages = tag[2], t = new Date(), TimeStamp, ra = responses.Body["RecordArray"]; - if (typeof ra === 'string') { responses.Body["RecordArray"] = [responses.Body["RecordArray"]]; } + if (typeof ra === 'string') { ra = [ra]; } for (i in ra) { e = Buffer.from(ra[i], 'base64'); diff --git a/redirserver.js b/redirserver.js index 3d1abebb..1d82f051 100644 --- a/redirserver.js +++ b/redirserver.js @@ -113,14 +113,13 @@ module.exports.CreateRedirServer = function (parent, db, args, func) { if (parent.config.domains[i].dns != null) { continue; } var url = parent.config.domains[i].url; obj.app.get(url, performRedirection); // Root redirection - obj.app.get(url + 'player.htm', performRedirection); // Player redirection // Setup any .well-known folders var p = obj.parent.path.join(obj.parent.datapath, '.well-known' + ((parent.config.domains[i].id == '') ? '' : ('-' + parent.config.domains[i].id))); if (obj.parent.fs.existsSync(p)) { obj.app.use(url + '.well-known', obj.express.static(p)); } // Setup all of the redirections to HTTPS - const redirections = ['terms', 'logout', 'MeshServerRootCert.cer', 'mescript.ashx', 'checkmail', 'agentinvite', 'messenger', 'meshosxagent', 'devicepowerevents.ashx', 'downloadfile.ashx', 'userfiles/*', 'webrelay.ashx', 'health.ashx', 'logo.png', 'welcome.jpg']; + const redirections = ['player.htm', 'terms', 'logout', 'MeshServerRootCert.cer', 'mescript.ashx', 'checkmail', 'agentinvite', 'messenger', 'meshosxagent', 'devicepowerevents.ashx', 'downloadfile.ashx', 'userfiles/*', 'webrelay.ashx', 'health.ashx', 'logo.png', 'welcome.jpg']; for (i in redirections) { obj.app.get(url + redirections[i], performRedirection); } }