Fix NGINX API download regex

Users are allowed to supply namespace%2Fproject instead of a numeric ID
This commit is contained in:
Jacob Vosmaer 2015-10-14 11:12:21 +02:00 committed by GitLab
parent cb13980db8
commit 033a879cc9
2 changed files with 2 additions and 2 deletions

View file

@ -125,7 +125,7 @@ server {
return 418;
}
location ~ ^/api/v3/projects/[0-9]+/repository/archive {
location ~ ^/api/v3/projects/.*/repository/archive {
# 'Error' 418 is a hack to re-use the @gitlab-git-http-server block
error_page 418 = @gitlab-git-http-server;
return 418;

View file

@ -172,7 +172,7 @@ server {
return 418;
}
location ~ ^/api/v3/projects/[0-9]+/repository/archive {
location ~ ^/api/v3/projects/.*/repository/archive {
# 'Error' 418 is a hack to re-use the @gitlab-git-http-server block
error_page 418 = @gitlab-git-http-server;
return 418;