Add the ability to configure HSTS in NetBox #9448

Closed
opened 2025-12-29 20:50:04 +01:00 by adam · 1 comment
Owner

Originally created by @sarhaynes on GitHub (Apr 5, 2024).

Originally assigned to: @Julio-Oliveira-Encora on GitHub.

NetBox version

v3.7.3

Feature type

New functionality

Proposed functionality

Currently NetBox does not have configuration entries for HSTS. In order to enable this security feature it is necessary to set the following Django settings (see https://docs.djangoproject.com/en/5.0/ref/middleware/#http-strict-transport-security)

The recommend change to settings.py:

SECURE_HSTS_SECONDS =  getattr(configuration, 'SECURE_HSTS_SECONDS', 0) 
SECURE_HSTS_INCLUDE_SUBDOMAINS = getattr(configuration, 'SECURE_HSTS_INCLUDE_SUBDOMAINS', False)
SECURE_HSTS_PRELOAD = getattr(configuration, 'SECURE_HSTS_PRELOAD', False)

Use case

Add the ability to enable HSTS in configuration.py.

Database changes

None

External dependencies

None

Originally created by @sarhaynes on GitHub (Apr 5, 2024). Originally assigned to: @Julio-Oliveira-Encora on GitHub. ### NetBox version v3.7.3 ### Feature type New functionality ### Proposed functionality Currently NetBox does not have configuration entries for HSTS. In order to enable this security feature it is necessary to set the following Django settings (see https://docs.djangoproject.com/en/5.0/ref/middleware/#http-strict-transport-security) The recommend change to settings.py: ``` SECURE_HSTS_SECONDS = getattr(configuration, 'SECURE_HSTS_SECONDS', 0) SECURE_HSTS_INCLUDE_SUBDOMAINS = getattr(configuration, 'SECURE_HSTS_INCLUDE_SUBDOMAINS', False) SECURE_HSTS_PRELOAD = getattr(configuration, 'SECURE_HSTS_PRELOAD', False) ``` ### Use case Add the ability to enable HSTS in configuration.py. ### Database changes None ### External dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 20:50:04 +01:00
adam closed this issue 2025-12-29 20:50:04 +01:00
Author
Owner

@Julio-Oliveira-Encora commented on GitHub (Apr 9, 2024):

Please, could you assign it to me?

@Julio-Oliveira-Encora commented on GitHub (Apr 9, 2024): Please, could you assign it to me?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9448