Add a proper WSGI middleware.