Next.js Protect your Next.js API routes with middleware In this post, we will use the Next.js middleware feature to secure the API routes of a web application. Middleware has been released in Next.js 12