Skip to content

Commit 6cb70f5

Browse files
authored
Update default.conf
Very important. Closing a security gap. The .git folder is otherwise publicly visible. Particularly critical for private repository
1 parent bc141ca commit 6cb70f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nginx/conf.d/default.conf

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ server {
3535
fastcgi_read_timeout 300;
3636
}
3737

38+
location ~ /\.git {
39+
deny all;
40+
}
41+
3842
location ~ /\.ht {
3943
deny all;
4044
}
41-
}
45+
}

0 commit comments

Comments
 (0)