block access in prod

This commit is contained in:
Maze Winther 2025-07-16 15:48:30 +02:00
parent fbd14290c6
commit 3371a68896
1 changed files with 1 additions and 1 deletions

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);