Skip to content

Commit becf317

Browse files
Merge pull request #675 from fmount/forward-proto
[httpd] Set X-Forwarded-Proto only if empty
2 parents feddbb7 + a6695a3 commit becf317

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)