Add webserver.tls.rev_server boolean useful to tell FTL that unencrypted connections are still secure (in the context of Pi-hole solely being reachable through a reverse proxy)

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-05-28 14:45:03 +02:00
parent c5da10a4e2
commit d42d4be97b
6 changed files with 63 additions and 31 deletions
+7
View File
@@ -228,6 +228,12 @@ static int pihole_needLogin(lua_State *L) {
return 1; // number of results
}
// pihole.rev_proxy()
static int pihole_rev_proxy(lua_State *L) {
lua_pushboolean(L, config.webserver.tls.rev_proxy.v.b);
return 1; // number of results
}
static const luaL_Reg piholelib[] = {
{"ftl_version", pihole_ftl_version},
{"hostname", pihole_hostname},
@@ -237,6 +243,7 @@ static const luaL_Reg piholelib[] = {
{"include", pihole_include},
{"boxedlayout", pihole_boxedlayout},
{"needLogin", pihole_needLogin},
{"rev_proxy", pihole_rev_proxy},
{NULL, NULL}
};