Skip to content

Commit a6695a3

Browse files
committed
[httpd] Set X-Forwarded-Proto only if empty
As done for neutron-operator [1], adding a conditional to set the header only if it is empty. This is required in case we deploy with tls.podlevel=false and tls.ingress=true. [1] openstack-k8s-operators/neutron-operator#453 Signed-off-by: Francesco Pantano <[email protected]>
1 parent feddbb7 commit a6695a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/common/config/10-glance-httpd.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111

1212
## Request header rules
1313
## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader
14-
RequestHeader set X-Forwarded-Proto "https"
14+
{{- if $vhost.TLS }}
15+
RequestHeader setIfEmpty X-Forwarded-Proto "https"
16+
{{- else }}
17+
RequestHeader setIfEmpty X-Forwarded-Proto "http"
18+
{{- end }}
1519

1620
TimeOut {{ $vhost.TimeOut }}
1721

0 commit comments

Comments
 (0)