Add custom protocol support for Custom Links #10852

Closed
opened 2025-12-29 21:36:44 +01:00 by adam · 2 comments
Owner

Originally created by @DenDanskeMine on GitHub (Mar 6, 2025).

NetBox version

v4.2.2

Feature type

New functionality

Proposed functionality

Right now you can only choose HTTPS://, HTTP://, ftp:// and so on as the supported protocol.

It would be nice to have the possibility to use our own protocols.

fx: custom://

For me it just returns to the base url, of the page im on.

Some more details:

link: custom://{{ object.cf.IP_address }}

Expected: custom://<ip>

Output: https://<domain>/dcim/virtual-chassis/

Image

I really hope it make sense what Im trying to explain?

Use case

IT would make it possible to add custom protocols to links. Endless possibilities

Database changes

No response

External dependencies

No response

Originally created by @DenDanskeMine on GitHub (Mar 6, 2025). ### NetBox version v4.2.2 ### Feature type New functionality ### Proposed functionality Right now you can only choose HTTPS://, HTTP://, ftp:// and so on as the supported protocol. It would be nice to have the possibility to use our own protocols. fx: **custom://<data>** For me it just returns to the base url, of the page im on. Some more details: -------- **link:** `custom://{{ object.cf.IP_address }}` **Expected:** `custom://<ip>` **Output:** `https://<domain>/dcim/virtual-chassis/` ![Image](https://github.com/user-attachments/assets/d3cb0445-bc8a-40df-8579-fa6dd06d1d59) I really hope it make sense what Im trying to explain? ### Use case IT would make it possible to add custom protocols to links. Endless possibilities ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 21:36:44 +01:00
adam closed this issue 2025-12-29 21:36:44 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 6, 2025):

You can configure the ALLOWED_URL_SCHEMES parameter to permit whatever URL schemes you'd like in custom links. (Note, however, that these links will function only if the user's browser understands how to handle the scheme.)

@jeremystretch commented on GitHub (Mar 6, 2025): You can configure the [`ALLOWED_URL_SCHEMES`](https://netboxlabs.com/docs/netbox/en/stable/configuration/security/#allowed_url_schemes) parameter to permit whatever URL schemes you'd like in custom links. (Note, however, that these links will function only if the user's browser understands how to handle the scheme.)
Author
Owner

@DenDanskeMine commented on GitHub (Mar 6, 2025):

You can configure the ALLOWED_URL_SCHEMES parameter to permit whatever URL schemes you'd like in custom links. (Note, however, that these links will function only if the user's browser understands how to handle the scheme.)

Thank you Jeremy!

@DenDanskeMine commented on GitHub (Mar 6, 2025): > You can configure the [`ALLOWED_URL_SCHEMES`](https://netboxlabs.com/docs/netbox/en/stable/configuration/security/#allowed_url_schemes) parameter to permit whatever URL schemes you'd like in custom links. (Note, however, that these links will function only if the user's browser understands how to handle the scheme.) Thank you Jeremy!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10852