diff --git a/templates/autoscaling/config/wsgi-aodh.conf b/templates/autoscaling/config/wsgi-aodh.conf index 499bf72f..cde9292a 100644 --- a/templates/autoscaling/config/wsgi-aodh.conf +++ b/templates/autoscaling/config/wsgi-aodh.conf @@ -19,6 +19,14 @@ ServerSignature Off CustomLog /dev/stdout combined + ## Request header rules + ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader +{{- if $vhost.TLS }} + RequestHeader setIfEmpty X-Forwarded-Proto "https" +{{- else }} + RequestHeader setIfEmpty X-Forwarded-Proto "http" +{{- end }} + {{- if $vhost.TLS }} SetEnvIf X-Forwarded-Proto https HTTPS=1 diff --git a/templates/ceilometercentral/config/httpd.conf b/templates/ceilometercentral/config/httpd.conf index ffbdfbe4..16c1425f 100644 --- a/templates/ceilometercentral/config/httpd.conf +++ b/templates/ceilometercentral/config/httpd.conf @@ -34,7 +34,11 @@ CustomLog /dev/stdout proxy env=forwarded ## Request header rules ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader - RequestHeader set X-Forwarded-Proto "https" +{{- if .TLS }} + RequestHeader setIfEmpty X-Forwarded-Proto "https" +{{- else }} + RequestHeader setIfEmpty X-Forwarded-Proto "http" +{{- end }} LimitRequestBody 5368709122 LimitRequestFields 200