diff options
author | Juan Antonio Osorio Robles <jaosorior@redhat.com> | 2016-05-19 15:10:22 +0300 |
---|---|---|
committer | Juan Antonio Osorio Robles <jaosorior@redhat.com> | 2016-05-23 08:08:14 +0300 |
commit | b609a3b32ee8e68cef7e66fabff07ca8ad6d4649 (patch) | |
tree | d651a42895b41c1c00f4371399bf8d86d185a5c4 /etc/nova/api-paste.ini | |
parent | fe8a119e8d80de35d7f99e0c1d9a9e5095840146 (diff) | |
download | nova-b609a3b32ee8e68cef7e66fabff07ca8ad6d4649.tar.gz |
Add http_proxy_to_wsgi to api-paste
This sets up the HTTPProxyToWSGI middleware in front of Nova-API. 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 Nova.
So, for instance, when TLS connections are being terminated in the
proxy, and one tries to get the versions from the / resource of
Nova, 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: Ia78f73e96585ab33a379a0b0be6d9682f7fbd810
Closes-Bug: #1573766
Diffstat (limited to 'etc/nova/api-paste.ini')
-rw-r--r-- | etc/nova/api-paste.ini | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/nova/api-paste.ini b/etc/nova/api-paste.ini index 20d6b848c0..38ee164d07 100644 --- a/etc/nova/api-paste.ini +++ b/etc/nova/api-paste.ini @@ -51,6 +51,9 @@ paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory [filter:sizelimit] paste.filter_factory = oslo_middleware:RequestBodySizeLimiter.factory +[filter:http_proxy_to_wsgi] +paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory + [filter:legacy_v2_compatible] paste.filter_factory = nova.api.openstack:LegacyV2CompatibleWrapper.factory @@ -61,7 +64,7 @@ paste.app_factory = nova.api.openstack.compute:APIRouter.factory paste.app_factory = nova.api.openstack.compute:APIRouterV21.factory [pipeline:oscomputeversions] -pipeline = faultwrap oscomputeversionapp +pipeline = faultwrap http_proxy_to_wsgi oscomputeversionapp [app:oscomputeversionapp] paste.app_factory = nova.api.openstack.compute.versions:Versions.factory |