2149: fix 2147: MESSAGE_SIZE_LIMIT wasn't working r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Set client_max_body_size in the server's scope.

I haven't tested it but it makes sense regardless.

### Related issue(s)
- closes #2147


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
master
bors[bot] 3 years ago committed by GitHub
commit 42fceb622b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -84,6 +84,7 @@ http {
{% if WEBDAV_ADDRESS %}
set $webdav {{ WEBDAV_ADDRESS }};
{% endif %}
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
# Listen on HTTP only in kubernetes or behind reverse proxy
{% if KUBERNETES_INGRESS == 'true' or TLS_FLAVOR in [ 'mail-letsencrypt', 'notls', 'mail' ] %}
@ -159,7 +160,6 @@ http {
rewrite ^{{ WEB_WEBMAIL }}/(.*) /$1 break;
{% endif %}
include /etc/nginx/proxy.conf;
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
auth_request /internal/auth/user;
error_page 403 @webmail_login;
proxy_pass http://$webmail;
@ -175,7 +175,6 @@ http {
rewrite ^{{ WEB_WEBMAIL }}/(.*) /$1 break;
{% endif %}
include /etc/nginx/proxy.conf;
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
auth_request /internal/auth/user;
auth_request_set $user $upstream_http_x_user;
auth_request_set $token $upstream_http_x_user_token;

Loading…
Cancel
Save