mirror of
https://github.com/decolua/9router.git
synced 2026-05-08 12:01:28 +00:00
fix(auth): wire up dashboard auth guard as Next.js proxy (#227)
Dashboard routes were accessible without authentication because dashboardGuard.js was not connected to Next.js middleware pipeline. Created src/proxy.js to export the auth guard using Next.js 16 proxy convention. Now /dashboard routes properly redirect to /login when auth_token cookie is missing or invalid.
This commit is contained in:
5
src/proxy.js
Normal file
5
src/proxy.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export { proxy } from "./dashboardGuard";
|
||||
|
||||
export const config = {
|
||||
matcher: ["/", "/dashboard/:path*"],
|
||||
};
|
||||
Reference in New Issue
Block a user