1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added MeshCMD AmtInfoJSON --post [url] option.

This commit is contained in:
Ylian Saint-Hilaire 2021-07-19 15:42:29 -07:00
parent 3e46c671d5
commit af32310da7
5 changed files with 48 additions and 2 deletions

View file

@ -5721,6 +5721,20 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
if (obj.parent.config.firebase.relayserver) { parent.debug('email', 'Firebase-relay-handler'); obj.app.ws(url + 'firebaserelay.aspx', handleFirebaseRelayRequest); }
}
/*
// Testing code only, display a POST and return 200 OK
obj.app.post(url + 'post.aspx', function (req, res) {
var body = [];
req.on('data', function(chunk) {
body.push(chunk);
}).on('end', () => {
body = Buffer.concat(body).toString();
console.log(body);
res.sendStatus(200);
});
});
*/
// Setup auth strategies using passport if needed
if (typeof domain.authstrategies == 'object') {
const passport = domain.passport = require('passport');