diff --git a/scripts/pi-hole/lua/header.lp b/scripts/pi-hole/lua/header.lp index e59d2a1d..8b5d1b23 100644 --- a/scripts/pi-hole/lua/header.lp +++ b/scripts/pi-hole/lua/header.lp @@ -10,6 +10,7 @@ starttime = mg.time(true) hostname = pihole.hostname() +webhome = pihole.webhome() -- Get name of script by matching whatever is after the last "/" in the URI scriptname = mg.request_info.request_uri:match(pihole.webhome().."(.*)$") -- Fall back to "index.lp" if no match is found (e.g. when accessing the root) diff --git a/scripts/pi-hole/lua/header_authenticated.lp b/scripts/pi-hole/lua/header_authenticated.lp index 35ac7c6d..d062fd7a 100644 --- a/scripts/pi-hole/lua/header_authenticated.lp +++ b/scripts/pi-hole/lua/header_authenticated.lp @@ -94,7 +94,9 @@ mg.include('header.lp','r') Pi-hole Forum GitHub Pi-hole Releases + if pihole.needLogin(mg.request_info.remote_addr) then ?> Log out + end ?> diff --git a/scripts/pi-hole/lua/sidebar.lp b/scripts/pi-hole/lua/sidebar.lp index 5f37f9cd..78394e75 100644 --- a/scripts/pi-hole/lua/sidebar.lp +++ b/scripts/pi-hole/lua/sidebar.lp @@ -13,7 +13,7 @@
Status
@@ -28,13 +28,13 @@