summarylogtreecommitdiffstats
path: root/fix_redirect.patch
diff options
context:
space:
mode:
authorgraysky2017-10-30 16:54:26 -0400
committergraysky2017-10-30 16:54:26 -0400
commit033d32553be8c531fe36a4f0a1645b096f0617e3 (patch)
tree73bbf8d5eb0a6d06307c55ca43646c3cfe2461b0 /fix_redirect.patch
parent8415bdcec77b5699d9c8de0efad951b0b051cc0a (diff)
downloadaur-033d32553be8c531fe36a4f0a1645b096f0617e3.tar.gz
fix nginx redirect but lighttpd is still broken
Diffstat (limited to 'fix_redirect.patch')
-rw-r--r--fix_redirect.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/fix_redirect.patch b/fix_redirect.patch
new file mode 100644
index 000000000000..f042d7813fd7
--- /dev/null
+++ b/fix_redirect.patch
@@ -0,0 +1,15 @@
+--- a/advanced/index.php 2017-10-30 16:27:08.583096709 -0400
++++ b/advanced/index.php 2017-10-30 16:28:06.884263996 -0400
+@@ -10,7 +10,10 @@ function validIP($address){
+ }
+
+ $uri = escapeshellcmd($_SERVER['REQUEST_URI']);
+-$serverName = escapeshellcmd($_SERVER['SERVER_NAME']);
++// To retain the functionality of the block page when directly accessing blacklisted domains
++// See: https://github.com/pi-hole/pi-hole/wiki/Nginx-Configuration
++// $serverName = escapeshellcmd($_SERVER['SERVER_NAME']);
++$serverName = escapeshellcmd($_SERVER['HTTP_HOST']);
+
+ // If the server name is 'pi.hole', it's likely a user trying to get to the admin panel.
+ // Let's be nice and redirect them.
+