mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 02:39:25 +01:00
Show warning on login page when connection is not end-to-end encrypted
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -11,8 +11,9 @@
|
||||
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().."(.*)$")
|
||||
scriptname = mg.request_info.request_uri:match(webhome.."(.*)$")
|
||||
-- Fall back to "index.lp" if no match is found (e.g. when accessing the root)
|
||||
if scriptname == nil or string.len(scriptname) == 0 then scriptname = "index.lp" end
|
||||
|
||||
@@ -38,6 +39,10 @@ function in_array (val, tab)
|
||||
return false
|
||||
end
|
||||
|
||||
-- Connection is considered secure if either running natively on HTTPS or behind
|
||||
-- a reverse proxy (e.g. Traefik)
|
||||
is_secure = mg.request_info.https or pihole.rev_proxy()
|
||||
|
||||
?>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
Reference in New Issue
Block a user