summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>2016-10-10 09:42:04 +0300
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>2016-10-10 09:42:55 +0300
commit30eb0f0ae16c7ffd0f90c3874d3cbc462d5863a0 (patch)
tree6347822418fab2cc1811a11430cf03393744643a /etc
parent1a27bd8fef9e4f94b8f30731a0189a639f358a55 (diff)
downloadceilometer-30eb0f0ae16c7ffd0f90c3874d3cbc462d5863a0.tar.gz
Add http_proxy_to_wsgi to api-paste
This sets up the HTTPProxyToWSGI middleware in front of Ceilometer. The purpose of thise middleware is to set up the request URL correctly in case there is a proxy (For instance, a loadbalancer such as HAProxy) in front of Ceilometer. So, for instance, when TLS connections are being terminated in the proxy, and one tries to get the versions from the / resource of Ceilometer, one will notice that the protocol is incorrect; It will show 'http' instead of 'https'. So this middleware handles such cases. Thus helping Keystone discovery work correctly. The HTTPProxyToWSGI is off by default and needs to be enabled via a configuration value. Change-Id: I24f16dda49bd9e7930ca9f0d32bf0793463aff03 Closes-Bug: #1590608
Diffstat (limited to 'etc')
-rw-r--r--etc/ceilometer/api_paste.ini6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/ceilometer/api_paste.ini b/etc/ceilometer/api_paste.ini
index fcc9a2aa..f06634f3 100644
--- a/etc/ceilometer/api_paste.ini
+++ b/etc/ceilometer/api_paste.ini
@@ -5,7 +5,7 @@
# Remove authtoken from the pipeline if you don't want to use keystone authentication
[pipeline:main]
-pipeline = cors request_id authtoken api-server
+pipeline = cors http_proxy_to_wsgi request_id authtoken api-server
[app:api-server]
paste.app_factory = ceilometer.api.app:app_factory
@@ -19,3 +19,7 @@ paste.filter_factory = oslo_middleware:RequestId.factory
[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = ceilometer
+
+[filter:http_proxy_to_wsgi]
+paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory
+oslo_config_project = ceilometer