keystone.server.flask.application module

keystone.server.flask.application module

class keystone.server.flask.application.KeystoneDispatcherMiddleware(app, mounts=None)[source]

Bases: werkzeug.wsgi.DispatcherMiddleware

Allows one to mount middlewares or applications in a WSGI application.

This is useful if you want to combine multiple WSGI applications:

app = DispatcherMiddleware(app, {
    '/app2':        app2,
    '/app3':        app3
})

This is a modified version of the werkzeurg.wsgi.DispatchMiddleware to handle the “SCRIPT_NAME” and “PATH_INFO” mangling in a way that is compatible with the way paste.deploy and routes.Mapper works. For Migration from legacy routes.Mapper to native flask blueprints, we are treating each subsystem as their own “app”.

This Dispatcher also logs (debug) if we are dispatching a request to a non-native flask Mapper.

config
keystone.server.flask.application.application_factory(*args, **kw)[source]
keystone.server.flask.application.fail_gracefully(f)[source]

Log exceptions and aborts.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.