mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Fixed meshcore downloads.
This commit is contained in:
parent
9810e58cc0
commit
104f333734
2 changed files with 3 additions and 3 deletions
|
@ -46393,4 +46393,4 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -4526,9 +4526,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||||
if (req.query.dlcore != null) {
|
if (req.query.dlcore != null) {
|
||||||
// Download mesh core
|
// Download mesh core
|
||||||
var bin = parent.defaultMeshCores[req.query.dlcore];
|
var bin = parent.defaultMeshCores[req.query.dlcore];
|
||||||
if (bin == null) { try { res.sendStatus(404); } catch (ex) { } return; }
|
if ((bin == null) || (bin.length < 5)) { try { res.sendStatus(404); } catch (ex) { } return; }
|
||||||
setContentDispositionHeader(res, 'application/octet-stream', req.query.dlcore + '.js', null, 'meshcore.js');
|
setContentDispositionHeader(res, 'application/octet-stream', req.query.dlcore + '.js', null, 'meshcore.js');
|
||||||
res.send(bin);
|
res.send(bin.substring(4));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue