Enable X-Forwarded-Proto header for Heat and Nova
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>
Wed, 16 Dec 2015 16:56:29 +0000 (18:56 +0200)
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>
Thu, 17 Dec 2015 18:02:51 +0000 (20:02 +0200)
Change-Id: Icd666d9988d14ac1e9581f55589bf95243cc7641

manifests/loadbalancer.pp

index c4a317b..d4122ab 100644 (file)
@@ -579,6 +579,7 @@ class tripleo::loadbalancer (
     }
     $heat_options = {
       'rsprep' => "^Location:\\ http://${public_virtual_ip}(.*) Location:\\ https://${public_virtual_ip}\\1",
+      'http-request' => ['set-header X-Forwarded-Proto https if { ssl_fc }'],
     }
     $heat_cw_bind_opts = {
       "${heat_api_vip}:8003" => [],
@@ -788,6 +789,10 @@ class tripleo::loadbalancer (
     haproxy::listen { 'nova_osapi':
       bind             => $nova_osapi_bind_opts,
       collect_exported => false,
+      mode             => 'http',
+      options          => {
+          'http-request' => ['set-header X-Forwarded-Proto https if { ssl_fc }'],
+      },
     }
     haproxy::balancermember { 'nova_osapi':
       listening_service => 'nova_osapi',