Block or allow AI bots in Next.js: proxy.ts with verified IPs, and Vercel's AI Bots ruleset
Most Next.js bot-blocking snippets match the user agent in middleware.ts and stop there. That blocks honest crawlers and lets every impostor through. This version checks the operators' own IP lists, works with the Next.js 16 proxy convention, and does no network calls on the request path.