19c354aacd
This sets up the HTTPProxyToWSGI middleware in front of Neutron-API. The purpose of this 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 Neutron. So, for instance, when TLS connections are being terminated in the proxy, and one tries to get the versions from the / resource of Neutron, 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: Ice9ee8f4e04050271d59858f92034c230325718b Closes-Bug: #1590608
46 lines
1.4 KiB
INI
46 lines
1.4 KiB
INI
[composite:neutron]
|
|
use = egg:Paste#urlmap
|
|
/: neutronversions_composite
|
|
/v2.0: neutronapi_v2_0
|
|
|
|
[composite:neutronapi_v2_0]
|
|
use = call:neutron.auth:pipeline_factory
|
|
noauth = cors http_proxy_to_wsgi request_id catch_errors extensions neutronapiapp_v2_0
|
|
keystone = cors http_proxy_to_wsgi request_id catch_errors authtoken keystonecontext extensions neutronapiapp_v2_0
|
|
|
|
[composite:neutronversions_composite]
|
|
use = call:neutron.auth:pipeline_factory
|
|
noauth = cors http_proxy_to_wsgi neutronversions
|
|
keystone = cors http_proxy_to_wsgi neutronversions
|
|
|
|
[filter:request_id]
|
|
paste.filter_factory = oslo_middleware:RequestId.factory
|
|
|
|
[filter:catch_errors]
|
|
paste.filter_factory = oslo_middleware:CatchErrors.factory
|
|
|
|
[filter:cors]
|
|
paste.filter_factory = oslo_middleware.cors:filter_factory
|
|
oslo_config_project = neutron
|
|
|
|
[filter:http_proxy_to_wsgi]
|
|
paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory
|
|
|
|
[filter:keystonecontext]
|
|
paste.filter_factory = neutron.auth:NeutronKeystoneContext.factory
|
|
|
|
[filter:authtoken]
|
|
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
|
|
|
[filter:extensions]
|
|
paste.filter_factory = neutron.api.extensions:plugin_aware_extension_middleware_factory
|
|
|
|
[app:neutronversions]
|
|
paste.app_factory = neutron.api.versions:Versions.factory
|
|
|
|
[app:neutronapiapp_v2_0]
|
|
paste.app_factory = neutron.api.v2.router:APIRouter.factory
|
|
|
|
[filter:osprofiler]
|
|
paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
|