Fix git directory access closes #251

This commit is contained in:
Ric Harvey
2019-03-06 11:55:24 +00:00
parent a645caa44e
commit 0c439c32f9
2 changed files with 12 additions and 0 deletions

View File

@@ -26,6 +26,12 @@ server {
#real_ip_header X-Forwarded-For;
#set_real_ip_from 172.16.0.0/12;
# block access to sensitive information about git
location /.git {
deny all;
return 403;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html

View File

@@ -19,6 +19,12 @@ server {
#real_ip_header X-Forwarded-For;
#set_real_ip_from 172.16.0.0/12;
# block access to sensitive information about git
location /.git {
deny all;
return 403;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html