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
Add native support for SSO configuration through environment variables
and Docker secrets, eliminating the need to modify configuration.py
for common SSO providers.
Changes:
- Add OKTA OpenID Connect configuration variables:
- SOCIAL_AUTH_OKTA_OPENIDCONNECT_KEY (env var)
- SOCIAL_AUTH_OKTA_OPENIDCONNECT_SECRET (env var + Docker secret: okta_openidconnect_secret)
- SOCIAL_AUTH_OKTA_OPENIDCONNECT_API_URL (env var)
- Add Google OAuth2 configuration variables:
- SOCIAL_AUTH_GOOGLE_OAUTH2_KEY (env var)
- SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET (env var + Docker secret: google_oauth2_secret)
Follows existing patterns with _read_secret() for sensitive data and
environ.get() for non-sensitive configuration.
Resolves: netbox-community/netbox-docker#1139
2025-07-03 13:12:52 -05:00
8 changed files with 40 additions and 11 deletions