Disable access to .git and other dot files
Eelco Dolstra committed
Oct 10, 2016 at 12:07 UTC
045e81f3da06239665bec613451b4d9358a81fdd
1 file changed
+5
nixos-org/webserver.nix
+5
@@ -45,6 +45,11 @@ let
45
Redirect /tarballs http://tarballs.nixos.org
46
Redirect /releases/nixos https://d3g5gsiof5omrk.cloudfront.net/nixos
47
48
+ # Don't allow access to dot files (like .git).
49
+ RewriteEngine on
50
+ RewriteCond %{THE_REQUEST} ^.*/\.
51
+ RewriteRule ^(.*)$ - [R=404]
52
+
53
<Location /server-status>
54
SetHandler server-status
55
Allow from 127.0.0.1