Enable X-Forwarded-Proto header for keystone admin endpoint
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>
Thu, 14 Jan 2016 09:01:13 +0000 (11:01 +0200)
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>
Thu, 14 Jan 2016 09:01:13 +0000 (11:01 +0200)
This is useful for handling URLs properly when TLS is enabled.

Change-Id: I4defed679cf3b2980dcc4ce1db030c0fdf154bfe

manifests/loadbalancer.pp

index dbfc570..cde069d 100644 (file)
@@ -768,6 +768,10 @@ class tripleo::loadbalancer (
     haproxy::listen { 'keystone_admin':
       bind             => $keystone_admin_bind_opts,
       collect_exported => false,
+      mode             => 'http', # Needed for http-request option
+      options          => {
+          'http-request' => ['set-header X-Forwarded-Proto https if { ssl_fc }'],
+      },
     }
     haproxy::balancermember { 'keystone_admin':
       listening_service => 'keystone_admin',