Browse Source

Disable viewing of .git directory (#214)

Ben Knowles 6 years ago
parent
commit
17271a2f61
1 changed files with 12 additions and 3 deletions
  1. 12 3
      debian/resources/nginx/fusionpbx

+ 12 - 3
debian/resources/nginx/fusionpbx

@@ -31,7 +31,7 @@ server {
 		fastcgi_read_timeout 15m;
 	}
 
-	# Disable viewing .htaccess & .htpassword & .db
+	# Disable viewing .htaccess & .htpassword & .db & .git
 	location ~ .htaccess {
 			deny all;
 	}
@@ -41,6 +41,9 @@ server {
 	location ~^.+.(db)$ {
 			deny all;
 	}
+	location ~ /.git/ {
+			deny all;
+	}
 }
 
 server {
@@ -137,7 +140,7 @@ server {
 		fastcgi_read_timeout 15m;
 	}
 
-	# Disable viewing .htaccess & .htpassword & .db
+	# Disable viewing .htaccess & .htpassword & .db & .git
 	location ~ .htaccess {
 		deny all;
 	}
@@ -147,6 +150,9 @@ server {
 	location ~^.+.(db)$ {
 		deny all;
 	}
+	location ~ /.git/ {
+		deny all;
+	}
 }
 
 server {
@@ -243,7 +249,7 @@ server {
 		fastcgi_read_timeout 15m;
 	}
 
-	# Disable viewing .htaccess & .htpassword & .db
+	# Disable viewing .htaccess & .htpassword & .db & .git
 	location ~ .htaccess {
 		deny all;
 	}
@@ -253,4 +259,7 @@ server {
 	location ~^.+.(db)$ {
 		deny all;
 	}
+	location ~ /.git/ {
+		deny all;
+	}
 }