Redirect rooms to login

This commit is contained in:
2024-08-22 22:53:35 +02:00
parent 1501d8bf51
commit ef29913036
2 changed files with 6 additions and 1 deletions

View File

@@ -70,6 +70,10 @@ export const getFiefAuthMiddleware = async (url) => {
matcher: "/browse",
parameters: {},
},
{
matcher: "/rooms",
parameters: {},
},
];
return (await getFiefAuth(url))?.middleware(protectedPaths);
};

View File

@@ -44,7 +44,8 @@ export async function middleware(request: NextRequest) {
if (
request.nextUrl.pathname == "/" ||
request.nextUrl.pathname.startsWith("/transcripts") ||
request.nextUrl.pathname.startsWith("/browse")
request.nextUrl.pathname.startsWith("/browse") ||
request.nextUrl.pathname.startsWith("/rooms")
) {
return NextResponse.rewrite(
request.nextUrl.origin + "/" + domain + request.nextUrl.pathname,