Set max size for external S3 upload requests

Fix uploads failing when exceeding the default nginx limit
This commit is contained in:
Râu Cao 2023-11-08 21:44:49 +01:00
parent 390753faa3
commit 087616b6b6
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
3 changed files with 4 additions and 0 deletions

View File

@ -10,3 +10,4 @@ node.default['garage']['s3_api_root_domain'] = '.s3.garage.localhost'
node.default['garage']['s3_web_root_domain'] = '.web.garage.localhost'
node.default['garage']['s3_web_domains'] = []
node.default['garage']['xmpp_upload_bucket'] = nil
node.default['garage']['max_part_upload_size_mb'] = 101

View File

@ -17,6 +17,7 @@ openresty_site domain_name do
variables server_name: "#{domain_name} #{server_name}",
domain_name: domain_name,
xmpp_upload_bucket: node['garage']['xmpp_upload_bucket'],
max_part_upload_size_mb: node['garage']["max_part_upload_size_mb"],
ssl_cert: "/etc/letsencrypt/live/#{domain_name}/fullchain.pem",
ssl_key: "/etc/letsencrypt/live/#{domain_name}/privkey.pem"
end

View File

@ -16,6 +16,8 @@ server {
error_page 401 403 404 500 /__empty-page.html;
client_max_body_size <%= @max_part_upload_size_mb %>m;
location = /__empty-page.html {
internal;
return 200 "";