summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>2016-08-05 11:21:23 +0300
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>2016-08-05 11:21:23 +0300
commit9838f8fa3192812a26e32d303fee8be29e7ffae4 (patch)
treefae9d9cfda6dfcfbd6d391b4566f40f80b1ba067
parent2c58021c61c0eb321396d08fc052bdb2cf57e21c (diff)
Add passing of X-Forwarded-Proto to Glance API endpoint
Glance supports the http_proxy_to_wsgi middlware, and it was recently enabled in the overcloud [1]. However, for it to work properly, we need to add the X-Forwarded-Proto header which was missing from the HAProxy configuration. [1] I4a8f7fc079ca93c50aa0ef7b0548dc64f6c5cfa0 Change-Id: I82e2db1145b0476cec27676fdfbb97e86cbd8182
-rw-r--r--manifests/haproxy.pp6
1 files changed, 6 insertions, 0 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 407fbb7..4e82a8b 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -593,6 +593,12 @@ class tripleo::haproxy (
ip_addresses => hiera('glance_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
public_ssl_port => $ports[glance_api_ssl_port],
+ mode => 'http',
+ listen_options => {
+ 'http-request' => [
+ 'set-header X-Forwarded-Proto https if { ssl_fc }',
+ 'set-header X-Forwarded-Proto http if !{ ssl_fc }'],
+ },
}
}