Skip to content

Conversation

@alexanderhofstaetter
Copy link
Contributor

@alexanderhofstaetter alexanderhofstaetter commented Sep 13, 2025

…inx-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: #897

…inx-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: netbox-community#897
@tobiasge tobiasge enabled auto-merge September 26, 2025 07:05
@tobiasge tobiasge merged commit 481a102 into netbox-community:develop Sep 26, 2025
9 checks passed
@tobiasge tobiasge mentioned this pull request Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants