From c6252bafbeace36f3a727129b0c67af359ecf3bf Mon Sep 17 00:00:00 2001 From: Kliachin Aleksei Date: Wed, 25 Mar 2026 04:01:38 +0300 Subject: [PATCH 1/2] nginx: allow large file uploads for /api/v4/files endpoint --- nginx/conf.d/default.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 78e01e1..44d089b 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -110,6 +110,21 @@ server { proxy_pass http://backend; } + location = /api/v4/files { + client_max_body_size 0; + client_body_timeout 1200s; + proxy_set_header Connection ""; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Frame-Options SAMEORIGIN; + proxy_set_header Early-Data $ssl_early_data; + proxy_read_timeout 600s; + proxy_http_version 1.1; + proxy_pass http://backend; + } + location / { client_max_body_size 50M; proxy_set_header Connection ""; From 9680c46e5852cce94472962d594ade6cb6a14d57 Mon Sep 17 00:00:00 2001 From: Kliachin Aleksei Date: Mon, 4 May 2026 18:28:41 +0300 Subject: [PATCH 2/2] Up default client_max_body_size to 100M --- nginx/conf.d/default.conf | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 44d089b..8e57087 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -110,23 +110,8 @@ server { proxy_pass http://backend; } - location = /api/v4/files { - client_max_body_size 0; - client_body_timeout 1200s; - proxy_set_header Connection ""; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Frame-Options SAMEORIGIN; - proxy_set_header Early-Data $ssl_early_data; - proxy_read_timeout 600s; - proxy_http_version 1.1; - proxy_pass http://backend; - } - location / { - client_max_body_size 50M; + client_max_body_size 100M; proxy_set_header Connection ""; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr;