From 9838f8fa3192812a26e32d303fee8be29e7ffae4 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Fri, 5 Aug 2016 11:21:23 +0300 Subject: 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 --- manifests/haproxy.pp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'manifests') 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 }'], + }, } } -- cgit 1.2.3-korg