From e62af8be769852bac73ab89d814e8d6b2eeac6ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Hofst=C3=A4tter?= <6820505+alexanderhofstaetter@users.noreply.github.com> Date: Sat, 13 Sep 2025 13:06:29 +0200 Subject: [PATCH] Increase default NGINX Unit request body limit to 100 MB in docker/nginx-unit.json The current NGINX Unit configuration in netbox-docker implicitly limits incoming HTTP request bodies to roughly 2.5 MB. This causes file uploads (custom scripts, attachments, etc.) to fail with HTTP 413 before they reach Django, even when NetBox settings like FILE_UPLOAD_MAX_MEMORY_SIZE are raised. This change adds a settings block to docker/nginx-unit.json to raise the default limit: { "settings": { "http": { "max_body_size": 104857600 } } } With this change, new deployments can handle uploads up to 100 MB out of the box, aligning the container default with the capabilities of NetBox core and preventing unexpected 413 errors. Fixes: https://github.com/netbox-community/netbox-docker/issues/897 --- docker/nginx-unit.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker/nginx-unit.json b/docker/nginx-unit.json index c095611..95fa1ef 100644 --- a/docker/nginx-unit.json +++ b/docker/nginx-unit.json @@ -73,5 +73,10 @@ } } }, - "access_log": "/dev/stdout" + "access_log": "/dev/stdout", + "settings": { + "http": { + "max_body_size": 104857600 + } + } }