Bläddra i källkod

Disable viewing of .git directory (#214)

Ben Knowles 6 år sedan
förälder
incheckning
17271a2f61
1 ändrade filer med 12 tillägg och 3 borttagningar
  1. 12 3
      debian/resources/nginx/fusionpbx

+ 12 - 3
debian/resources/nginx/fusionpbx

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