summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri Savineau <dsavinea@redhat.com>2016-03-23 10:14:30 -0400
committerDimitri Savineau <dsavinea@redhat.com>2016-04-15 11:12:19 -0400
commit96058c80cb2236d5549c366aa6d2c66d39d86d8b (patch)
treeea1d5bb31f91613e5eab676f1c83c82024a3029e
parent25d403306d1b300bb344f7b655de7487bdddce0e (diff)
Enable HAProxy forwardfor option for Horizon.
Horizon's backends (httpd) see IP address of the haproxy in the logs instead of the client address. Adding forwardfor option allows to add the client address to the X-Forwarded-For HTTP header and can be replace in the logs by configured the backend servers with this header. Change-Id: I54f0f5549d64768dacca71539c71a28cc99d9d95
-rw-r--r--manifests/loadbalancer.pp2
1 files changed, 2 insertions, 0 deletions
diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp
index f9d0473..70ccbc1 100644
--- a/manifests/loadbalancer.pp
+++ b/manifests/loadbalancer.pp
@@ -520,6 +520,7 @@ class tripleo::loadbalancer (
'rsprep' => '^Location:\ http://(.*) Location:\ https://\1',
# NOTE(jaosorior): We always redirect to https for the public_virtual_ip.
'redirect' => "scheme https code 301 if { hdr(host) -i ${public_virtual_ip} } !{ ssl_fc }",
+ 'option' => 'forwardfor',
}
} else {
$horizon_bind_opts = {
@@ -528,6 +529,7 @@ class tripleo::loadbalancer (
}
$horizon_options = {
'cookie' => 'SERVERID insert indirect nocache',
+ 'option' => 'forwardfor',
}
}