mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-11-05 07:58:20 +00:00
[Nginx] Limit request body size, configurable via NGINX_MAX_BODY_SIZE
This commit is contained in:
5 files changed
+25
-4
No files matched your search
@@ -22,7 +22,8 @@ add_header Referrer-Policy strict-origin;
|
||||
|
||||
index index.php index.html;
|
||||
|
||||
client_max_body_size 0;
|
||||
# PHP accepts no larger requests (post_max_size), SOGo webmail, CalDAV/CardDAV and ActiveSync use NGINX_MAX_BODY_SIZE
|
||||
client_max_body_size 64m;
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
@@ -182,6 +183,8 @@ location /sogo-auth-verify {
|
||||
proxy_set_header Content-Length "";
|
||||
proxy_pass http://127.0.0.1:65510/sogo-auth;
|
||||
proxy_pass_request_body off;
|
||||
# The subrequest checks the size of the original request against this limit, the body is never read here
|
||||
client_max_body_size {{ NGINX_MAX_BODY_SIZE }};
|
||||
}
|
||||
|
||||
location ^~ /Microsoft-Server-ActiveSync {
|
||||
@@ -205,7 +208,7 @@ location ^~ /Microsoft-Server-ActiveSync {
|
||||
proxy_busy_buffers_size 512k;
|
||||
proxy_set_header Host $http_host;
|
||||
client_body_buffer_size 512k;
|
||||
client_max_body_size 0;
|
||||
client_max_body_size {{ NGINX_MAX_BODY_SIZE }};
|
||||
}
|
||||
|
||||
location ^~ /SOGo {
|
||||
@@ -256,7 +259,7 @@ location ^~ /SOGo {
|
||||
proxy_send_timeout 3600;
|
||||
proxy_read_timeout 3600;
|
||||
client_body_buffer_size 128k;
|
||||
client_max_body_size 0;
|
||||
client_max_body_size {{ NGINX_MAX_BODY_SIZE }};
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user