A WSGI Middleware is a function or callable object similar to a
WSGI application handlers
with the only difference that it can return nothing (
Middleware can be used in conjunction with a WsgiHandler or any other handler which iterate through a list of middleware in a similar way (for example django wsgi handler).
An asynchronous WSGI middleware is a callble accepting a WSGI
start_response as the only input paramaters and
it must returns an asynchronous iterator
The two most important wsgi middleware in pulsar are:
In addition, pulsar provides with the following four middlewares which don’t serve requests, instead they perform initialisation and sanity checks.
Clean url from double slashes and redirect if needed.