mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-02-13 22:15:45 +01:00
17 lines
458 B
TypeScript
17 lines
458 B
TypeScript
import { neonAuthMiddleware } from "@neondatabase/auth/next/server";
|
|
|
|
// Next.js 16 renamed middleware to proxy
|
|
// neonAuthMiddleware returns a middleware function, we export it as proxy
|
|
export const proxy = neonAuthMiddleware({
|
|
// Redirects unauthenticated users to sign-in page
|
|
loginUrl: "/auth/sign-in",
|
|
});
|
|
|
|
export const config = {
|
|
matcher: [
|
|
// Protected routes requiring authentication
|
|
"/dashboard/:path*",
|
|
"/account/:path*",
|
|
],
|
|
};
|