Make uilock configurable (#1747)

This commit is contained in:
Tim Wilkinson 2024-12-04 12:11:30 -08:00 committed by GitHub
parent 4cdfa79ea0
commit b074727492
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ export let resourcehash = true;
export let authenable = true;
export let forceauth = false;
export let forcemobile = false;
export let uilock = true;
if (hardware.isLowMemNode()) {
preload = false;

View File

@ -554,7 +554,7 @@ global.handle_request = function(env)
const isMobile = !!(config.forcemobile || match(env.HTTP_USER_AGENT, /iphone/i) || match(env.HTTP_USER_AGENT, /android.*mobile/i));
let res = "";
let changelock = null;
if (env.REQUEST_METHOD !== "GET") {
if (config.uilock && env.REQUEST_METHOD !== "GET") {
changelock = fs.open(lockfile);
if (!(changelock && changelock.lock("x"))) {
uhttpd.send("Status: 500 Internal server error\r\n\r\n");