From 62bf9957dc39f6bfbb1fb4d493c657889793cdf1 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Fri, 7 Aug 2020 23:57:20 -0400 Subject: [PATCH] lighttpd conf: collect ^/admin/ conditions move a sub-condition to be a nested condition under ^/admin/ Signed-off-by: Glenn Strauss --- advanced/lighttpd.conf.debian | 18 +++++++++--------- advanced/lighttpd.conf.fedora | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/advanced/lighttpd.conf.debian b/advanced/lighttpd.conf.debian index f57bad2d..cb52cf38 100644 --- a/advanced/lighttpd.conf.debian +++ b/advanced/lighttpd.conf.debian @@ -95,17 +95,17 @@ $HTTP["url"] =~ "^/admin/" { "X-Permitted-Cross-Domain-Policies" => "none", "Referrer-Policy" => "same-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 = ("") + } -# allow teleporter and API qr code iframe on settings page -$HTTP["url"] =~ "/(teleporter|api_token)\.php$" { - $HTTP["referer"] =~ "/admin/settings\.php" { - setenv.add-response-header = ( "X-Frame-Options" => "SAMEORIGIN" ) + # allow teleporter and API qr code iframe on settings page + $HTTP["url"] =~ "/(teleporter|api_token)\.php$" { + $HTTP["referer"] =~ "/admin/settings\.php" { + setenv.add-response-header = ( "X-Frame-Options" => "SAMEORIGIN" ) + } } } diff --git a/advanced/lighttpd.conf.fedora b/advanced/lighttpd.conf.fedora index 34056672..39c665f5 100644 --- a/advanced/lighttpd.conf.fedora +++ b/advanced/lighttpd.conf.fedora @@ -103,17 +103,17 @@ $HTTP["url"] =~ "^/admin/" { "X-Permitted-Cross-Domain-Policies" => "none", "Referrer-Policy" => "same-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 = ("") + } -# allow teleporter and API qr code iframe on settings page -$HTTP["url"] =~ "/(teleporter|api_token)\.php$" { - $HTTP["referer"] =~ "/admin/settings\.php" { - setenv.add-response-header = ( "X-Frame-Options" => "SAMEORIGIN" ) + # allow teleporter and API qr code iframe on settings page + $HTTP["url"] =~ "/(teleporter|api_token)\.php$" { + $HTTP["referer"] =~ "/admin/settings\.php" { + setenv.add-response-header = ( "X-Frame-Options" => "SAMEORIGIN" ) + } } }