diff --git a/templates/ironicinspector/config/httpd.conf b/templates/ironicinspector/config/httpd.conf index 5b98949e..1b904b00 100644 --- a/templates/ironicinspector/config/httpd.conf +++ b/templates/ironicinspector/config/httpd.conf @@ -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