From f67064495468fdceebdb0b1f17eb7b4afa6f7ec9 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 26 Oct 2018 19:12:11 +0100 Subject: [PATCH 1/2] Revert "lighttpd conf enhancements" --- advanced/lighttpd.conf.debian | 11 +++++------ advanced/lighttpd.conf.fedora | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/advanced/lighttpd.conf.debian b/advanced/lighttpd.conf.debian index 8b04be71..b5bece72 100644 --- a/advanced/lighttpd.conf.debian +++ b/advanced/lighttpd.conf.debian @@ -64,13 +64,12 @@ $HTTP["url"] =~ "^/admin/" { # Allow Block Page access to local fonts setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) } +} - # Block . files from being served, such as .git, .github, .gitignore - $HTTP["url"] =~ "^/admin/\." { - url.access-deny = ("") - } +# Block . files from being served, such as .git, .github, .gitignore +$HTTP["url"] =~ "^/admin/\.(.*)" { + url.access-deny = ("") } # Add user chosen options held in external file -# (use file glob for optional file) -include "external*.conf" +include_shell "cat external.conf 2>/dev/null" diff --git a/advanced/lighttpd.conf.fedora b/advanced/lighttpd.conf.fedora index 4a782060..43d94d84 100644 --- a/advanced/lighttpd.conf.fedora +++ b/advanced/lighttpd.conf.fedora @@ -82,13 +82,12 @@ $HTTP["url"] =~ "^/admin/" { # Allow Block Page access to local fonts setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) } +} - # Block . files from being served, such as .git, .github, .gitignore - $HTTP["url"] =~ "^/admin/\." { - url.access-deny = ("") - } +# Block . files from being served, such as .git, .github, .gitignore +$HTTP["url"] =~ "^/admin/\.(.*)" { + url.access-deny = ("") } # Add user chosen options held in external file -# (use file glob for optional file) -include "external*.conf" +include_shell "cat external.conf 2>/dev/null" From 28cbf45d1d6c3d0423534c17f00ae61ac7b4aa1f Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Tue, 30 Oct 2018 21:52:42 -0400 Subject: [PATCH 2/2] Add explanatory comment for include_shell Signed-off-by: Mcat12 --- advanced/lighttpd.conf.debian | 1 + advanced/lighttpd.conf.fedora | 1 + 2 files changed, 2 insertions(+) diff --git a/advanced/lighttpd.conf.debian b/advanced/lighttpd.conf.debian index b5bece72..d9c4a110 100644 --- a/advanced/lighttpd.conf.debian +++ b/advanced/lighttpd.conf.debian @@ -72,4 +72,5 @@ $HTTP["url"] =~ "^/admin/\.(.*)" { } # Add user chosen options held in external file +# This uses include_shell instead of an include wildcard for compatibility include_shell "cat external.conf 2>/dev/null" diff --git a/advanced/lighttpd.conf.fedora b/advanced/lighttpd.conf.fedora index 43d94d84..27bc33cc 100644 --- a/advanced/lighttpd.conf.fedora +++ b/advanced/lighttpd.conf.fedora @@ -90,4 +90,5 @@ $HTTP["url"] =~ "^/admin/\.(.*)" { } # Add user chosen options held in external file +# This uses include_shell instead of an include wildcard for compatibility include_shell "cat external.conf 2>/dev/null"