Commit graph

9 commits

Author SHA1 Message Date
Alexander Hofstätter e62af8be76
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
2025-09-13 13:06:29 +02:00
Tobias Genannt 1aa742342c Make superlinter happy 2025-02-05 07:20:46 +01:00
Mikulas Willaschek 230cd09cb5 Update nginx-unit.json with new listeners and forwarded sources 2025-02-05 07:19:44 +01:00
Tobias Genannt afd18c6f39 Fixes #1331: Added 'forwarded' section Unit config
Simplifies the listener configuration by using a wildcard for the IP and
adds a forwarded section that trusts all proxies on RFC1918 networks.
2024-11-05 13:20:04 +01:00
Tobias Genannt d3a30e1172 Updated to new unit version 2023-03-01 07:39:37 +01:00
Christian Mäder 6020f4503a
Make nginx-unit listen on IPv4 and IPv6 2022-11-23 14:40:03 +01:00
Tobias Genannt 9e2f4313fb First version of Debian based image 2022-06-10 09:31:41 +02:00
Christian Mäder 0d25aff744 Add editorconfig 2021-02-08 18:24:29 +01:00
Tobias Genannt d273391773 Gunicorn is replaced with nginx-unit
We now serve Netbox with an nginx-unit instance instead of Gunicorn.
This allows us to get rid of the extra Nginx container because Unit is
also serving the static files. The static files are now collected at container
buildtime instead of every startup.
2021-01-15 09:22:22 +01:00