mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
Redirect rooms to login
This commit is contained in:
@@ -70,6 +70,10 @@ export const getFiefAuthMiddleware = async (url) => {
|
|||||||
matcher: "/browse",
|
matcher: "/browse",
|
||||||
parameters: {},
|
parameters: {},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
matcher: "/rooms",
|
||||||
|
parameters: {},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
return (await getFiefAuth(url))?.middleware(protectedPaths);
|
return (await getFiefAuth(url))?.middleware(protectedPaths);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ export async function middleware(request: NextRequest) {
|
|||||||
if (
|
if (
|
||||||
request.nextUrl.pathname == "/" ||
|
request.nextUrl.pathname == "/" ||
|
||||||
request.nextUrl.pathname.startsWith("/transcripts") ||
|
request.nextUrl.pathname.startsWith("/transcripts") ||
|
||||||
request.nextUrl.pathname.startsWith("/browse")
|
request.nextUrl.pathname.startsWith("/browse") ||
|
||||||
|
request.nextUrl.pathname.startsWith("/rooms")
|
||||||
) {
|
) {
|
||||||
return NextResponse.rewrite(
|
return NextResponse.rewrite(
|
||||||
request.nextUrl.origin + "/" + domain + request.nextUrl.pathname,
|
request.nextUrl.origin + "/" + domain + request.nextUrl.pathname,
|
||||||
|
|||||||
Reference in New Issue
Block a user