Add WrapMiddleware type for adding custom middleware to routes, where different routes need different middleware