[composite:congress]
use = egg:Paste#urlmap
/: congressversions
/v1: congress_api_v1

[pipeline:congressversions]
pipeline = cors 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

[app:congress_api]
paste.app_factory = congress.service:congress_app_factory

[filter:request_id]
paste.filter_factory = oslo_middleware:RequestId.factory

[filter:catch_errors]
paste.filter_factory = oslo_middleware:CatchErrors.factory

[filter:keystonecontext]
paste.filter_factory = congress.auth:CongressKeystoneContext.factory

[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory

[filter:cors]
paste.filter_factory =  oslo_middleware.cors:filter_factory
oslo_config_project = congress

[composite:congress]
use = egg:Paste#urlmap
/: congressversions
/v1: congress_api_v1

[pipeline:congressversions]
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 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

[filter:request_id]
paste.filter_factory = oslo_middleware:RequestId.factory

[filter:catch_errors]
paste.filter_factory = oslo_middleware:CatchErrors.factory

[filter:keystonecontext]
paste.filter_factory = congress.auth:CongressKeystoneContext.factory

[filter:authtoken]
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

Set HTTPProxyTOWSGI middleware in front of congress.
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
