Commit f160bd3f authored by Robert Speicher's avatar Robert Speicher Committed by Robert Speicher

Merge branch 'nginx-workhorse-upload-limit' into 'master'

Nginx workhorse upload limit

See merge request !1919
parent e53c0c55
...@@ -114,24 +114,28 @@ server { ...@@ -114,24 +114,28 @@ server {
} }
location ~ ^/[\w\.-]+/[\w\.-]+/gitlab-lfs/objects { location ~ ^/[\w\.-]+/[\w\.-]+/gitlab-lfs/objects {
client_max_body_size 0;
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
error_page 418 = @gitlab-workhorse; error_page 418 = @gitlab-workhorse;
return 418; return 418;
} }
location ~ ^/[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$ { location ~ ^/[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$ {
client_max_body_size 0;
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
error_page 418 = @gitlab-workhorse; error_page 418 = @gitlab-workhorse;
return 418; return 418;
} }
location ~ ^/[\w\.-]+/[\w\.-]+/repository/archive { location ~ ^/[\w\.-]+/[\w\.-]+/repository/archive {
client_max_body_size 0;
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
error_page 418 = @gitlab-workhorse; error_page 418 = @gitlab-workhorse;
return 418; return 418;
} }
location ~ ^/api/v3/projects/.*/repository/archive { location ~ ^/api/v3/projects/.*/repository/archive {
client_max_body_size 0;
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
error_page 418 = @gitlab-workhorse; error_page 418 = @gitlab-workhorse;
return 418; return 418;
...@@ -139,16 +143,18 @@ server { ...@@ -139,16 +143,18 @@ server {
# Build artifacts should be submitted to this location # Build artifacts should be submitted to this location
location ~ ^/[\w\.-]+/[\w\.-]+/builds/download { location ~ ^/[\w\.-]+/[\w\.-]+/builds/download {
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block client_max_body_size 0;
error_page 418 = @gitlab-workhorse; # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
return 418; error_page 418 = @gitlab-workhorse;
return 418;
} }
# Build artifacts should be submitted to this location # Build artifacts should be submitted to this location
location ~ /ci/api/v1/builds/[0-9]+/artifacts { location ~ /ci/api/v1/builds/[0-9]+/artifacts {
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block client_max_body_size 0;
error_page 418 = @gitlab-workhorse; # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
return 418; error_page 418 = @gitlab-workhorse;
return 418;
} }
location @gitlab-workhorse { location @gitlab-workhorse {
......
...@@ -161,24 +161,28 @@ server { ...@@ -161,24 +161,28 @@ server {
} }
location ~ ^/[\w\.-]+/[\w\.-]+/gitlab-lfs/objects { location ~ ^/[\w\.-]+/[\w\.-]+/gitlab-lfs/objects {
client_max_body_size 0;
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
error_page 418 = @gitlab-workhorse; error_page 418 = @gitlab-workhorse;
return 418; return 418;
} }
location ~ ^/[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$ { location ~ ^/[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$ {
client_max_body_size 0;
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
error_page 418 = @gitlab-workhorse; error_page 418 = @gitlab-workhorse;
return 418; return 418;
} }
location ~ ^/[\w\.-]+/[\w\.-]+/repository/archive { location ~ ^/[\w\.-]+/[\w\.-]+/repository/archive {
client_max_body_size 0;
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
error_page 418 = @gitlab-workhorse; error_page 418 = @gitlab-workhorse;
return 418; return 418;
} }
location ~ ^/api/v3/projects/.*/repository/archive { location ~ ^/api/v3/projects/.*/repository/archive {
client_max_body_size 0;
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
error_page 418 = @gitlab-workhorse; error_page 418 = @gitlab-workhorse;
return 418; return 418;
...@@ -186,16 +190,18 @@ server { ...@@ -186,16 +190,18 @@ server {
# Build artifacts should be submitted to this location # Build artifacts should be submitted to this location
location ~ ^/[\w\.-]+/[\w\.-]+/builds/download { location ~ ^/[\w\.-]+/[\w\.-]+/builds/download {
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block client_max_body_size 0;
error_page 418 = @gitlab-workhorse; # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
return 418; error_page 418 = @gitlab-workhorse;
return 418;
} }
# Build artifacts should be submitted to this location # Build artifacts should be submitted to this location
location ~ /ci/api/v1/builds/[0-9]+/artifacts { location ~ /ci/api/v1/builds/[0-9]+/artifacts {
# 'Error' 418 is a hack to re-use the @gitlab-workhorse block client_max_body_size 0;
error_page 418 = @gitlab-workhorse; # 'Error' 418 is a hack to re-use the @gitlab-workhorse block
return 418; error_page 418 = @gitlab-workhorse;
return 418;
} }
location @gitlab-workhorse { location @gitlab-workhorse {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment