diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-07-16 15:48:30 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-07-16 15:48:30 +0200 |
| commit | 3371a6889634f326063351295faca9a56c566706 (patch) | |
| tree | 1f73487a77f2064b3a4535788f5e7e233fc42981 /apps/web/src | |
| parent | fbd14290c6e64a3b5d435e2092da04642461ec05 (diff) | |
| download | opencut-3371a6889634f326063351295faca9a56c566706.tar.gz | |
block access in prod
Diffstat (limited to 'apps/web/src')
| -rw-r--r-- | apps/web/src/middleware.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts index 57e1e808..1f229e6d 100644 --- a/apps/web/src/middleware.ts +++ b/apps/web/src/middleware.ts @@ -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);
|
