diff --git a/conf/nginx-site-ssl.conf b/conf/nginx-site-ssl.conf index 1bdf6e8..b022445 100644 --- a/conf/nginx-site-ssl.conf +++ b/conf/nginx-site-ssl.conf @@ -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 diff --git a/conf/nginx-site.conf b/conf/nginx-site.conf index 4d9c6a6..3c38946 100644 --- a/conf/nginx-site.conf +++ b/conf/nginx-site.conf @@ -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