Skip to content

Commit

Permalink
Fix httpd config for X-Forwarded-Proto
Browse files Browse the repository at this point in the history
  • Loading branch information
mumesan committed Jan 3, 2025
1 parent 6e7951e commit f560e33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions templates/ironicinspector/config/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ CustomLog /dev/stdout proxy env=forwarded
ServerName {{ $vhost.ServerName }}

## Request header rules
## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader
RequestHeader set X-Forwarded-Proto "https"
## as per http://httpd.apache.org/docs/2.4/mod/mod_headers.html#requestheader
{{- if $vhost.TLS }}
RequestHeader setIfEmpty X-Forwarded-Proto "https"
{{- else }}
RequestHeader setIfEmpty X-Forwarded-Proto "http"
{{- end }}

## Proxy rules
ProxyRequests Off
Expand Down

0 comments on commit f560e33

Please sign in to comment.