Base class(es) for WSGI Middleware.
Bases: object
Base WSGI middleware wrapper.
These classes require an application to be initialized that will be called next. By default the middleware will simply call its wrapped app, or you can override __call__ to customize its behavior.
Factory method for paste.deploy.
Called on each request.
If this returns None, the next application down the stack will be executed. If it returns a response then that response will be returned and execution will stop here.
Do whatever you’d like to the response.