mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-02-13 15:15:45 +01:00
refactor: migrate middleware.ts to proxy.ts (Next.js 16)
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import { neonAuthMiddleware } from "@neondatabase/auth/next/server";
|
import { neonAuthMiddleware } from "@neondatabase/auth/next/server";
|
||||||
|
|
||||||
export default neonAuthMiddleware({
|
// 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
|
// Redirects unauthenticated users to sign-in page
|
||||||
loginUrl: "/auth/sign-in",
|
loginUrl: "/auth/sign-in",
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user