Add Middleware to an API Route Created with next-connect

Share this video with your friends

Send Tweet

We'll learn how to create a middleware function for next-connect. This middleware will work at the route level, for example, for every request that hits the /api/next-connect-middleware endpoint, or at the HTTP verb level, GET /api/next-connect-middleware