mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-20 01:50:22 -05:00
fix manifest.json with userAllowedIP using DNS values #7283
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
@@ -4061,6 +4061,7 @@ async function resolveDomainsToIps(originalArray) {
|
||||
console.log(`Could not resolve ${item}`);
|
||||
}
|
||||
}
|
||||
if (flatResult.length == 0) { return undefined; }
|
||||
return flatResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -3833,9 +3833,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
|
||||
// Return a customised mainifest.json for PWA
|
||||
function handleManifestRequest(req, res){
|
||||
const domain = getDomain(req);
|
||||
const domain = checkUserIpAddress(req);
|
||||
if (domain == null) { parent.debug('web', 'handleManifestRequest: no domain'); res.sendStatus(404); return; }
|
||||
if ((obj.userAllowedIp != null) && (checkIpAddressEx(req, res, obj.userAllowedIp, false) === false)) { parent.debug('web', 'handleManifestRequest: invalid ip'); return; } // Check server-wide IP filter only.
|
||||
parent.debug('web', 'handleManifestRequest()');
|
||||
var manifest = {
|
||||
"name": (domain.title != null) ? domain.title : 'MeshCentral',
|
||||
|
||||
Reference in New Issue
Block a user