disallow access to dotfiles besides .well-known by default
This commit is contained in:
parent
8fd7a20a7c
commit
81f7b5337c
3 changed files with 13 additions and 0 deletions
|
|
@ -86,6 +86,15 @@ server {
|
|||
}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if vhost.disallow_dotfiles %}
|
||||
# disallow every path starting with a dot except .well-known/
|
||||
location ~ /\.(?!well-known\/).* {
|
||||
deny all;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if vhost.auth.enable %}
|
||||
auth_basic "restricted area";
|
||||
auth_basic_user_file {{ vhost.auth.path }};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue