We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e361ed commit d37a4c7Copy full SHA for d37a4c7
h5bp/location/protect-system-files.conf
@@ -1,10 +1,13 @@
1
# Prevent clients from accessing hidden files (starting with a dot)
2
# This is particularly important if you store .htpasswd files in the site hierarchy
3
-location ~* (?:^|/)\. {
+# 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\/) {
7
deny all;
8
}
9
10
# Prevent clients from accessing to backup/config/source files
-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])|~)$ {
12
13
0 commit comments