From 90ca6d11ff7bbd095fc329c6998cb218ca1f0ec8 Mon Sep 17 00:00:00 2001 From: MOH Date: Fri, 6 Mar 2026 15:30:47 +0100 Subject: [PATCH] Apply maintenance mode to all non-admin routes --- middleware.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/middleware.ts b/middleware.ts index 06728cb..7d0649e 100644 --- a/middleware.ts +++ b/middleware.ts @@ -114,7 +114,6 @@ async function isSuperAdminSessionValid(request: NextRequest): Promise export default async function middleware(request: NextRequest) { const { pathname } = request.nextUrl; const locale = getLocaleFromPath(pathname); - const isSuperAdmin = await isSuperAdminSessionValid(request); const isRootBaseRoute = pathname === "/root" || pathname.startsWith("/root/"); const isRootRoute = isRootBaseRoute; @@ -137,7 +136,7 @@ export default async function middleware(request: NextRequest) { return NextResponse.next(); } - if (!isRootRoute && !isComingSoonRoute && !isSuperAdmin) { + if (!isRootRoute && !isComingSoonRoute) { const maintenanceModeEnabled = await isMaintenanceModeEnabled(request); if (maintenanceModeEnabled) {