Add the ability to wrap a middleware.