Fix middleware for API auth

This commit is contained in:
Karol Głowacki
2026-01-09 19:26:01 +01:00
parent 193d2bb059
commit 06d874bab9

View File

@@ -6,7 +6,7 @@ const JWT_SECRET = new TextEncoder().encode(
process.env.JWT_SECRET || "fallback-secret-change-in-production"
);
const publicPaths = ["/login", "/api/auth/login"];
const publicPaths = ["/login", "/api/auth"];
export async function middleware(request: NextRequest) {
const { pathname } = request.nextUrl;