Added option to disable mobile site.
Ylian Saint-Hilaire committed
Feb 3, 2022 at 18:50 UTC
dcc950f7debaf1e223c79f18b0d62c32b25bcebd
2 files changed
+2
meshcentral-config-schema.json
+1
@@ -299,6 +299,7 @@
299
"titlePicture": { "type": "string", "default": null, "description": "Web site .png logo file that is 450x66 in size placed in meshcentral-data that is used on the top of many pages." },
300
"loginPicture": { "type": "string", "default": null, "description": "Web site .png logo file placed in meshcentral-data that used on the login page when sitestyle is 2." },
301
"rootRedirect": { "type": "string", "default": null, "description": "Redirects HTTP root requests to this URL. When in use, direct users to /login to see the normal login page." },
302
+ "mobileSite": { "type": "boolean", "default": true, "description": "When set to false, this setting will disable the mobile site." },
303
"unknownUserRootRedirect": { "type": "string", "default": null, "description": "Redirects HTTP root requests to this URL only where user is not already logged in. When in use, direct users to /login to see the normal login page." },
304
"userQuota": { "type": "integer" },
305
"meshQuota": { "type": "integer" },
webserver.js
+1
@@ -7440,6 +7440,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
7440
var mobile = isMobileBrowser(req), minify = (domain.minify == true), p;
7441
if (req.query.mobile == '1') { mobile = true; } else if (req.query.mobile == '0') { mobile = false; }
7442
if (req.query.minify == '1') { minify = true; } else if (req.query.minify == '0') { minify = false; }
7443
+ if ((domain != null) && (domain.mobilesite === false)) { mobile = false; }
7444
if (mobile) {
7445
if ((domain != null) && (domain.webviewspath != null)) { // If the domain has a web views path, use that first
7446
if (minify) {