Set HTTPProxyTOWSGI middleware in front of congress.

The purpose of this middleware is to set up the request URL correctly in
case there is a proxy in front of congress.

The HTTPProxyToWSGI is off by default and needs to be enabled via a
configuration value.

Change-Id: Ib0aaebbd42daa94e93ba1daefd3e84241f95e92a
This commit is contained in:
shashi.kant 2016-10-10 15:49:24 +05:30
parent b2d96b56f7
commit 46620ea447
1 changed files with 7 additions and 3 deletions

View File

@ -4,15 +4,15 @@ use = egg:Paste#urlmap
/v1: congress_api_v1
[pipeline:congressversions]
pipeline = cors catch_errors congressversionapp
pipeline = cors http_proxy_to_wsgi catch_errors congressversionapp
[app:congressversionapp]
paste.app_factory = congress.api.versions:Versions.factory
[composite:congress_api_v1]
use = call:congress.auth:pipeline_factory
keystone = cors request_id catch_errors authtoken keystonecontext congress_api
noauth = cors request_id catch_errors congress_api
keystone = cors http_proxy_to_wsgi request_id catch_errors authtoken keystonecontext congress_api
noauth = cors http_proxy_to_wsgi request_id catch_errors congress_api
[app:congress_api]
paste.app_factory = congress.service:congress_app_factory
@ -32,3 +32,7 @@ paste.filter_factory = keystonemiddleware.auth_token:filter_factory
[filter:cors]
paste.filter_factory = oslo_middleware.cors:filter_factory
oslo_config_project = congress
[filter:http_proxy_to_wsgi]
paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory
oslo_config_project = congress