Pecan: add http_proxy_to_wsgi middleware
Pecan does not currently use api paste to load middleware like the legacy wsgi, so we need to explicitly import it and wrap the pecan app. This is a follow-up to Ice9ee8f4e04050271d59858f92034c230325718b. Change-Id: I3e1b08bf1f902cf09c8a39699c00f1b0d22c3277 Closes-Bug: #1590608
This commit is contained in:
parent
80d4df144d
commit
e6d6a38770
|
@ -17,6 +17,7 @@ from keystonemiddleware import auth_token
|
|||
from neutron_lib import exceptions as n_exc
|
||||
from oslo_config import cfg
|
||||
from oslo_middleware import cors
|
||||
from oslo_middleware import http_proxy_to_wsgi
|
||||
from oslo_middleware import request_id
|
||||
import pecan
|
||||
|
||||
|
@ -80,6 +81,9 @@ def _wrap_app(app):
|
|||
# version can be unauthenticated so it goes outside of auth
|
||||
app = versions.Versions(app)
|
||||
|
||||
# handle cases where neutron-server is behind a proxy
|
||||
app = http_proxy_to_wsgi.HTTPProxyToWSGI(app)
|
||||
|
||||
# This should be the last middleware in the list (which results in
|
||||
# it being the first in the middleware chain). This is to ensure
|
||||
# that any errors thrown by other middleware, such as an auth
|
||||
|
|
Loading…
Reference in New Issue