Skip to content

Commit 6b18b20

Browse files
committed
added protection for hg git and bz
1 parent fbc3332 commit 6b18b20

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

data/templates/ngingx_vhost_default.stpl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ server {
2727
proxy_pass https://%ip%:%web_ssl_port%;
2828
}
2929

30-
location ~ /\.ht {deny all;}
31-
location ~ /.svn/ {deny all;}
30+
location ~ /\.ht {return 404;}
31+
location ~ /\.svn/ {return 404;}
32+
location ~ /\.git/ {return 404;}
33+
location ~ /\.hg/ {return 404;}
34+
location ~ /\.bzr/ {return 404;}
3235

3336
include %home%/%user%/conf/snginx.%domain%.conf*;
3437
}

data/templates/ngingx_vhost_default.tpl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ server {
2424
proxy_pass http://%ip%:%web_port%;
2525
}
2626

27-
location ~ /\.ht {deny all;}
28-
location ~ /.svn/ {deny all;}
27+
location ~ /\.ht {return 404;}
28+
location ~ /\.svn/ {return 404;}
29+
location ~ /\.git/ {return 404;}
30+
location ~ /\.hg/ {return 404;}
31+
location ~ /\.bzr/ {return 404;}
2932

3033
include %home%/%user%/conf/nginx.%domain%.conf*;
3134
}

0 commit comments

Comments
 (0)