From f560e333dad52325e5879d63400ba31f260b3344 Mon Sep 17 00:00:00 2001 From: mumesan Date: Fri, 3 Jan 2025 11:51:08 +0000 Subject: [PATCH] Fix httpd config for X-Forwarded-Proto --- templates/ironicinspector/config/httpd.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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