Export
config with matcher: ["/dashboard/:path*"]Exporting config with matcher: ["/dashboard/:path*"] is correct. The matcher filters paths before middleware runs. The tempting "Place middleware.ts inside app/dashboard" is wrong. Next.js supports only one middleware file per project, at the root or inside src.