From 1c26632a39480715efef5f144e08b76382898f00 Mon Sep 17 00:00:00 2001 From: d11n Date: Wed, 17 Aug 2022 12:27:02 +0200 Subject: [PATCH] Apply client_max_body_size to all server settings Fixes btcpayserver/btcpayserver#4018. Previously, the setting was only part of the `is_https` branch. --- Production/nginx.tmpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Production/nginx.tmpl b/Production/nginx.tmpl index a93e7db..d8db563 100644 --- a/Production/nginx.tmpl +++ b/Production/nginx.tmpl @@ -373,6 +373,7 @@ upstream {{ $upstream_name }} { {{ $onionHost := read (printf "/var/lib/tor/hidden_services/%s/hostname" $hiddenHostName) }} {{ if ne $onionHost "" }} server { + client_max_body_size 100M; server_name {{ trim $onionHost }}; listen 80 ; proxy_set_header X-Forwarded-Host $http_host; @@ -562,6 +563,7 @@ server { {{ if or (not $is_https) (eq $https_method "noredirect") }} server { + client_max_body_size 100M; server_name {{ $host }}; listen 80 {{ $default_server }}; {{ if $enable_ipv6 }} @@ -606,6 +608,7 @@ server { {{ if (and (not $is_https) (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }} server { + client_max_body_size 100M; server_name {{ $host }}; listen 443 ssl http2 {{ $default_server }}; {{ if $enable_ipv6 }}