From 6425f440d3138e2c207cd48c59223c8d657a7c0c Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Fri, 7 Jan 2022 08:55:55 +0100 Subject: [PATCH] fix 2147 --- core/nginx/conf/nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/nginx/conf/nginx.conf b/core/nginx/conf/nginx.conf index bc6780f5..8fee8989 100644 --- a/core/nginx/conf/nginx.conf +++ b/core/nginx/conf/nginx.conf @@ -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;