reverse_proxy: set client_max_body_size correctly

Without this, it is possible that HTTP uploads will not pass
if the default limit isn’t raised elsewhere.
This commit is contained in:
Jonas Schäfer 2021-06-23 19:23:03 +02:00
parent 97586c08b6
commit 46bfccda83
1 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,9 @@ server {
proxy_pass http://localhost:5080/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# A bit of headroom over the 16MB accepted by Prosody.
client_max_body_size 20MB;
}
}
@ -86,6 +89,9 @@ server {
proxy_ssl_verify off;
proxy_set_header X-Forwarded-Proto https;
proxy_ssl_server_name on;
# A bit of headroom over the 16MB accepted by Prosody.
client_max_body_size 20MB;
}
}
```