Rack links don't prepend HTTPS using documented RequestHeader "X-Forwarded-Proto" #6904

Closed
opened 2025-12-29 19:46:32 +01:00 by adam · 3 comments
Owner

Originally created by @tsbates on GitHub (Aug 30, 2022).

NetBox version

v3.2.8

Python version

3.8

Steps to Reproduce

  1. Navigate to Organization, Racks & select a rack with an added device.
  2. Click the device in the rack view

Expected Behavior

The device appears on screen

Observed Behavior

The page results in a 404 Not Found as 'https'.

Originally created by @tsbates on GitHub (Aug 30, 2022). ### NetBox version v3.2.8 ### Python version 3.8 ### Steps to Reproduce 1. Navigate to Organization, Racks & select a rack with an added device. 2. Click the device in the rack view ### Expected Behavior The device appears on screen ### Observed Behavior The page results in a 404 Not Found as 'https'.
adam added the type: bug label 2025-12-29 19:46:32 +01:00
adam closed this issue 2025-12-29 19:46:32 +01:00
Author
Owner

@tsbates commented on GitHub (Aug 30, 2022):

The apache configuration file within /contrib states the RequestHeader should be
"RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}", however this fails to start apache. Setting "RequestHeader set "X-Forwarded-Proto" expr="%{REQUEST_SCHEME}e"" allows apache to start, however the observed behaviour is still present.

Setting the RequestHeader as follows results in the correct behaviour:

"RequestHeader set X-Forwarded-Proto https env=HTTPS"

@tsbates commented on GitHub (Aug 30, 2022): The apache configuration file within /contrib states the RequestHeader should be "RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}", however this fails to start apache. Setting "RequestHeader set "X-Forwarded-Proto" expr="%{REQUEST_SCHEME}e"" allows apache to start, however the observed behaviour is still present. Setting the RequestHeader as follows results in the correct behaviour: "RequestHeader set X-Forwarded-Proto https env=HTTPS"
Author
Owner

@DanSheps commented on GitHub (Aug 30, 2022):

What version of Apache are you using?

@DanSheps commented on GitHub (Aug 30, 2022): What version of Apache are you using?
Author
Owner

@jeremystretch commented on GitHub (Aug 30, 2022):

I have verified that the configuration as it exists now works as expected under Apache 2.4.29:

RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}

With this line in place, absolute URLs (such as those within rack elevations) are generated with the https:// prefix. Without it, the prefix does not appear. If this is not the case for you, it's likely that you need to upgrade your Apache installation.

I'm going to close this report as invalid. If you need further assistance please open a new discussion.

@jeremystretch commented on GitHub (Aug 30, 2022): I have verified that the configuration as it exists now works as expected under Apache 2.4.29: ``` RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} ``` With this line in place, absolute URLs (such as those within rack elevations) are generated with the `https://` prefix. Without it, the prefix does not appear. If this is not the case for you, it's likely that you need to upgrade your Apache installation. I'm going to close this report as invalid. If you need further assistance please open a new [discussion](https://github.com/netbox-community/netbox/discussions/new).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6904