This commit is contained in:
Carl-Gerhard Lindesvärd
2024-11-28 21:07:48 +01:00
parent defc78d0f8
commit ee598e3bdd

View File

@@ -14,7 +14,7 @@ const isPublicRoute = createRouteMatcher([
export default clerkMiddleware(
(auth, req) => {
if (!process.env.MAINTENANCE_MODE && !req.url.includes('/maintenance')) {
if (process.env.MAINTENANCE_MODE && !req.url.includes('/maintenance')) {
return NextResponse.redirect(new URL('/maintenance', req.url), 307);
}
if (!isPublicRoute(req)) {