From bbc204b6019ddafcc9cc8a389e5511a4fdd1bbb4 Mon Sep 17 00:00:00 2001 From: zocomputer Date: Sat, 13 Jun 2026 09:57:20 +0700 Subject: [PATCH] fix: use export default in proxy.js for Next.js 16 middleware detection Next.js 16 requires a default export to register middleware. The named re-export produced an empty middleware manifest, so the auth guard never ran and the dashboard showed a white "Loading..." page. Co-authored-by: Cursor --- src/proxy.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/proxy.js b/src/proxy.js index 7d0b50b7..566dd14c 100644 --- a/src/proxy.js +++ b/src/proxy.js @@ -1,4 +1,8 @@ -export { proxy } from "./dashboardGuard"; +import { proxy as dashboardProxy } from "./dashboardGuard"; + +export default async function proxy(request) { + return dashboardProxy(request); +} export const config = { matcher: ["/((?!_next/static|_next/image|favicon\\.ico).*)"],