From f03303e5aa4523071b92ef44ccc2ee5c1c9281fe Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Tue, 3 May 2016 11:58:13 -0400 Subject: [PATCH] Add X-Pi-hole header --- advanced/lighttpd.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/advanced/lighttpd.conf b/advanced/lighttpd.conf index 761f9a24..f899350a 100644 --- a/advanced/lighttpd.conf +++ b/advanced/lighttpd.conf @@ -46,11 +46,16 @@ include_shell "/usr/share/lighttpd/include-conf-enabled.pl" # If the URL starts with /admin, it is the Web interface $HTTP["url"] =~ "^/admin/" { # Create a response header for debugging using curl -I - setenv.add-response-header = ( "X-Frame-Options" => "DENY" ) + setenv.add-response-header = ( + "X-Pi-hole" => "The Pi-hole Web interface is working!", + "X-Frame-Options" => "DENY" + ) } # If the URL does not start with /admin, then it is a query for an ad domain $HTTP["url"] =~ "^(?!/admin)/.*" { + # Create a response header for debugging using curl -I + setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." ) # rewrite only js requests url.rewrite = ("(.*).js" => "pihole/index.js") }