block access in prod

This commit is contained in:
Maze Winther
2025-07-16 15:48:30 +02:00
parent fbd14290c6
commit 3371a68896
+1 -1
View File
@@ -10,7 +10,7 @@ export async function middleware(request: NextRequest) {
const path = request.nextUrl.pathname;
if (path === "/editor" && env.NODE_ENV === "production") {
if (path.startsWith("/editor") && env.NODE_ENV === "production") {
const homeUrl = new URL("/", request.url);
homeUrl.searchParams.set("redirect", request.url);
return NextResponse.redirect(homeUrl);