mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added MeshCentral Router for macOS
This commit is contained in:
parent
9766adf465
commit
12dd791cf6
5 changed files with 25 additions and 6 deletions
13
webserver.js
13
webserver.js
|
@ -4419,6 +4419,12 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralAssistant.exe', null, 'MeshCentralAssistant.exe');
|
||||
try { res.sendFile(p); } catch (e) { res.sendStatus(404); }
|
||||
} else { res.sendStatus(404); }
|
||||
} else if (req.query.meshaction == 'macrouter') {
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.dmg');
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralRouter.dmg', null, 'MeshCentralRouter.dmg');
|
||||
try { res.sendFile(p); } catch (e) { res.sendStatus(404); }
|
||||
} else { res.sendStatus(404); }
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -4470,6 +4476,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
setContentDispositionHeader(res, 'application/octet-stream', 'meshaction.txt', null, 'meshaction.txt');
|
||||
res.send(JSON.stringify(meshaction, null, ' '));
|
||||
} else if (req.query.meshaction == 'winrouter') {
|
||||
console.log('t2');
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.exe');
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralRouter.exe', null, 'MeshCentralRouter.exe');
|
||||
|
@ -4481,6 +4488,12 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralAssistant.exe', null, 'MeshCentralAssistant.exe');
|
||||
try { res.sendFile(p); } catch (e) { res.sendStatus(404); }
|
||||
} else { res.sendStatus(404); }
|
||||
} else if (req.query.meshaction == 'macrouter') {
|
||||
var p = obj.path.join(__dirname, 'agents', 'MeshCentralRouter.dmg');
|
||||
if (obj.fs.existsSync(p)) {
|
||||
setContentDispositionHeader(res, 'application/octet-stream', 'MeshCentralRouter.dmg', null, 'MeshCentralRouter.dmg');
|
||||
try { res.sendFile(p); } catch (e) { res.sendStatus(404); }
|
||||
} else { res.sendStatus(404); }
|
||||
} else {
|
||||
res.sendStatus(401);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue