diff --git a/scripts/pi-hole/lua/header.lp b/scripts/pi-hole/lua/header.lp index d444e498..1facf8ea 100644 --- a/scripts/pi-hole/lua/header.lp +++ b/scripts/pi-hole/lua/header.lp @@ -43,6 +43,9 @@ end -- a reverse proxy (e.g. Traefik) is_secure = mg.request_info.https or pihole.rev_proxy() +-- Variable to check if user is already authenticated +is_authenticated = mg.request_info.is_authenticated + ?>
@@ -86,15 +89,21 @@ is_secure = mg.request_info.https or pihole.rev_proxy() - - - - if startsWith(scriptname, 'groups') then ?> - + +if startsWith(scriptname, 'groups') then + -- Group management styles +?> - end ?> + end ?> + if is_authenticated then ?> + + + + end ?> + + diff --git a/scripts/pi-hole/lua/header_authenticated.lp b/scripts/pi-hole/lua/header_authenticated.lp index d062fd7a..acecf73c 100644 --- a/scripts/pi-hole/lua/header_authenticated.lp +++ b/scripts/pi-hole/lua/header_authenticated.lp @@ -9,9 +9,6 @@ ]]-- mg.include('header.lp','r') ?> - - -