mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
block access in prod
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user