lighttpd conf: collect ^/admin/ conditions

move a sub-condition to be a nested condition under ^/admin/

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
Glenn Strauss 2020-08-07 23:57:20 -04:00
parent dafc9983f5
commit 62bf9957dc
No known key found for this signature in database
GPG key ID: 86EFB5FBAF16D0F0
2 changed files with 18 additions and 18 deletions

View file

@ -95,10 +95,9 @@ $HTTP["url"] =~ "^/admin/" {
"X-Permitted-Cross-Domain-Policies" => "none", "X-Permitted-Cross-Domain-Policies" => "none",
"Referrer-Policy" => "same-origin" "Referrer-Policy" => "same-origin"
) )
}
# Block . files from being served, such as .git, .github, .gitignore # Block . files from being served, such as .git, .github, .gitignore
$HTTP["url"] =~ "^/admin/\.(.*)" { $HTTP["url"] =~ "^/admin/\." {
url.access-deny = ("") url.access-deny = ("")
} }
@ -108,6 +107,7 @@ $HTTP["url"] =~ "/(teleporter|api_token)\.php$" {
setenv.add-response-header = ( "X-Frame-Options" => "SAMEORIGIN" ) setenv.add-response-header = ( "X-Frame-Options" => "SAMEORIGIN" )
} }
} }
}
# Default expire header # Default expire header
expire.url = ( "" => "access plus 0 seconds" ) expire.url = ( "" => "access plus 0 seconds" )

View file

@ -103,10 +103,9 @@ $HTTP["url"] =~ "^/admin/" {
"X-Permitted-Cross-Domain-Policies" => "none", "X-Permitted-Cross-Domain-Policies" => "none",
"Referrer-Policy" => "same-origin" "Referrer-Policy" => "same-origin"
) )
}
# Block . files from being served, such as .git, .github, .gitignore # Block . files from being served, such as .git, .github, .gitignore
$HTTP["url"] =~ "^/admin/\.(.*)" { $HTTP["url"] =~ "^/admin/\." {
url.access-deny = ("") url.access-deny = ("")
} }
@ -116,6 +115,7 @@ $HTTP["url"] =~ "/(teleporter|api_token)\.php$" {
setenv.add-response-header = ( "X-Frame-Options" => "SAMEORIGIN" ) setenv.add-response-header = ( "X-Frame-Options" => "SAMEORIGIN" )
} }
} }
}
# Default expire header # Default expire header
expire.url = ( "" => "access plus 0 seconds" ) expire.url = ( "" => "access plus 0 seconds" )