fix manifest.json with userAllowedIP using DNS values #7283

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Sep 18, 2025 at 10:06 UTC 4379eb5f33e465c0876bfe13e4ef2c42d43185b1
2 files changed +2 -2
meshcentral.js
+1
@@ -4061,6 +4061,7 @@ async function resolveDomainsToIps(originalArray) {
4061 console.log(`Could not resolve ${item}`);
4062 }
4063 }
4064 + if (flatResult.length == 0) { return undefined; }
4065 return flatResult;
4066 }
4067
webserver.js
+1 -2
@@ -3833,9 +3833,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
3833
3834 // Return a customised mainifest.json for PWA
3835 function handleManifestRequest(req, res){
3836 - const domain = getDomain(req);
3836 + const domain = checkUserIpAddress(req);
3837 if (domain == null) { parent.debug('web', 'handleManifestRequest: no domain'); res.sendStatus(404); return; }
3838 - if ((obj.userAllowedIp != null) && (checkIpAddressEx(req, res, obj.userAllowedIp, false) === false)) { parent.debug('web', 'handleManifestRequest: invalid ip'); return; } // Check server-wide IP filter only.
3838 parent.debug('web', 'handleManifestRequest()');
3839 var manifest = {
3840 "name": (domain.title != null) ? domain.title : 'MeshCentral',