import NextAuth from "next-auth"; import { authConfig } from "./auth.config"; // Edge-sichere Middleware (KEIN DB-/argon2-Import). Default-deny-Schicht 1: // nicht authentifizierte Aufrufe werden über `authorized` auf /login geleitet. export const { auth: middleware } = NextAuth(authConfig); export default middleware(() => {}); export const config = { // Allowlist: NextAuth-Endpunkte, Health-Check, Login-Seite, Next-Statics. matcher: [ "/((?!api/auth|api/health|login|_next/static|_next/image|favicon.ico|.*\\.(?:png|svg|ico|jpg|webp|woff2?)$).*)", ], };