Files
FTL/test/api
010011110 cce7ea7700 Apply webserver.serve_all to / requested under another Host
`redirect_root_handler()` only redirects / to the web home when the Host
header is webserver.domain. For any other Host - the Pi-hole's IP
address, a missing Host header, "pi.hole." with a trailing dot - it
returned 0, which makes CivetWeb skip the remaining handlers and serve
the file itself. `request_handler()`, registered for "**", never ran, so
with webserver.serve_all=false (the default) an index.html, index.htm or
index.lp in the webroot was still served, and an index.lp executed,
while every other path outside the web home got 404.

Hand those requests to `request_handler()` instead. With serve_all off
/ now gets 404 like any other path outside the web home; with serve_all
on it returns 0 for / and CivetWeb serves the index as before. The
redirect for webserver.domain is unchanged.

Signed-off-by: 010011110 <duckenheim@posteo.de>
2026-10-04 10:26:36 +02:00
..
…
2026-05-06 19:10:21 +02:00