diff --git a/client/pages/_middleware.tsx b/client/pages/_middleware.tsx index 47019f6..e490446 100644 --- a/client/pages/_middleware.tsx +++ b/client/pages/_middleware.tsx @@ -49,6 +49,11 @@ export function middleware(req: NextRequest, event: NextFetchEvent) { return NextResponse.redirect(getURL("signin")) } } + + if (pathname.includes("/protected/") || pathname.includes("/private/")) { + const urlWithoutVisibility = pathname.replace("/protected/", "/").replace("/private/", "/").substring(1) + return NextResponse.redirect(getURL(urlWithoutVisibility)) + } } return NextResponse.next()