renamed middleware.ts to proxy.ts and removed the runtime export

This commit is contained in:
fuomag9
2025-12-28 15:18:04 +01:00
parent be21f46ad5
commit f9a3719b6b

View File

@@ -2,13 +2,12 @@ import { auth } from "@/src/lib/auth";
import { NextResponse } from "next/server";
/**
* Next.js Middleware for route protection.
* Next.js Proxy for route protection.
* Provides defense-in-depth by checking authentication at the edge
* before requests reach page components.
*
* Note: Uses Node.js runtime because auth requires database access.
* Note: Proxy always runs on Node.js runtime.
*/
export const runtime = 'nodejs';
export default auth((req) => {
const isAuthenticated = !!req.auth;