Allow configuring NETBOX_COPILOT_URL via configuration #60

Closed
opened 2026-04-05 16:21:24 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @MyEcoria on 3/27/2026

NetBox version

v4.5.5

Feature type

Change to existing functionality

Proposed functionality

Currently, the NETBOX_COPILOT_URL setting (https://github.com/netbox-community/netbox/blob/main/netbox/netbox/settings.py#L664) is hardcoded in the NetBox codebase. This proposal introduces the ability to configure this value via the standard NetBox configuration mechanism.

The implementation would:

Replace the hardcoded value with a configurable setting:

NETBOX_COPILOT_URL = getattr(
configuration,
"NETBOX_COPILOT_URL",
"https://static.copilot.netboxlabs.ai/load.js"
)

Use case

This feature enables several practical use cases:

Allowing organizations to use a self-hosted version of the Copilot script
Improving security and compliance by avoiding reliance on externally hosted JavaScript
Enabling customization or extension of Copilot behavior
Supporting restricted or air-gapped environments where external resources cannot be loaded

Currently, achieving this requires modifying the NetBox source code, which complicates upgrades and maintenance. Making this configurable aligns with existing NetBox patterns and provides a cleaner solution.

Database changes

None.

External dependencies

None.

*Originally created by @MyEcoria on 3/27/2026* ### NetBox version v4.5.5 ### Feature type Change to existing functionality ### Proposed functionality Currently, the `NETBOX_COPILOT_URL` setting (https://github.com/netbox-community/netbox/blob/main/netbox/netbox/settings.py#L664) is hardcoded in the NetBox codebase. This proposal introduces the ability to configure this value via the standard NetBox configuration mechanism. The implementation would: Replace the hardcoded value with a configurable setting: NETBOX_COPILOT_URL = getattr( configuration, "NETBOX_COPILOT_URL", "https://static.copilot.netboxlabs.ai/load.js" ) ### Use case This feature enables several practical use cases: Allowing organizations to use a self-hosted version of the Copilot script Improving security and compliance by avoiding reliance on externally hosted JavaScript Enabling customization or extension of Copilot behavior Supporting restricted or air-gapped environments where external resources cannot be loaded Currently, achieving this requires modifying the NetBox source code, which complicates upgrades and maintenance. Making this configurable aligns with existing NetBox patterns and provides a cleaner solution. ### Database changes None. ### External dependencies None.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#60