Skip to content

Commit d37a4c7

Browse files
committed
Updated locations to match h5bp's Apache config
See h5bp/server-configs-apache#31 for `well-known` change.
1 parent 8e361ed commit d37a4c7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Prevent clients from accessing hidden files (starting with a dot)
22
# This is particularly important if you store .htpasswd files in the site hierarchy
3-
location ~* (?:^|/)\. {
3+
# Access to `/.well-known/` is allowed.
4+
# https://www.mnot.net/blog/2010/04/07/well-known
5+
# https://tools.ietf.org/html/rfc5785
6+
location ~* /\.(?!well-known\/) {
47
deny all;
58
}
69

710
# Prevent clients from accessing to backup/config/source files
8-
location ~* (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
11+
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
912
deny all;
1013
}

0 commit comments

Comments
 (0)