mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-09-11 08:55:32 +03:00
Fixed meshcore downloads.
This commit is contained in:
parent
9810e58cc0
commit
104f333734
@ -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 New Issue
Block a user