Fix root auth prompt trigger and normalize maintenance route checks
CI / quality (push) Waiting to run
CI / quality (push) Waiting to run
This commit is contained in:
+6
-1
@@ -117,8 +117,13 @@ export default async function middleware(request: NextRequest) {
|
||||
const isSuperAdmin = await isSuperAdminSessionValid(request);
|
||||
|
||||
const isRootRoute =
|
||||
pathname === `/${locale}/root` || pathname.startsWith(`/${locale}/root/`);
|
||||
pathname === "/root" ||
|
||||
pathname.startsWith("/root/") ||
|
||||
pathname === `/${locale}/root` ||
|
||||
pathname.startsWith(`/${locale}/root/`);
|
||||
const isComingSoonRoute =
|
||||
pathname === "/coming-soon" ||
|
||||
pathname.startsWith("/coming-soon/") ||
|
||||
pathname === `/${locale}/coming-soon` ||
|
||||
pathname.startsWith(`/${locale}/coming-soon/`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user