Add "NGINX_CLIENT_MAX_BODY_SIZE" environment variable to customize request body size (this isn't applicable for inside AzuraCast, as we automatically split uploads up into smaller chunks, but is useful if submitting large requests via APIs).

This commit is contained in:
Buster Neece 2024-01-29 02:38:31 -06:00
parent 6b511b0803
commit 23a8bad004
No known key found for this signature in database
2 changed files with 8 additions and 1 deletions

View File

@ -246,6 +246,13 @@ final class AzuraCastEnvFile extends AbstractEnvFile
'options' => ['127.0.0.1', '*'],
'default' => '*',
],
'NGINX_CLIENT_MAX_BODY_SIZE' => [
'name' => __('Nginx Max Client Body Size'),
'description' => __(
'This is the total size any single request body can be. AzuraCast chunks its uploads into smaller file sizes, so this only applies when doing custom uploads via the API. Sizes should be listed in a format like "100K", "128M", "1G" for kilobytes, megabytes, and gigabytes respectively.'
),
'default' => '50M',
],
Environment::ENABLE_WEB_UPDATER => [
'name' => __('Enable web-based Docker image updates'),
'default' => true,

View File

@ -34,7 +34,7 @@ http {
sendfile on;
client_max_body_size 50M;
client_max_body_size {{ default .Env.NGINX_CLIENT_MAX_BODY_SIZE "50M" }};
client_body_temp_path /tmp/nginx_client 1 1;
fastcgi_temp_path /tmp/nginx_fastcgi 1 1;