mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 08:56:22 +02:00
make auth optional
This commit is contained in:
parent
4b3395ea3a
commit
861bae11a6
9 changed files with 73 additions and 27 deletions
|
|
@ -34,6 +34,10 @@ export async function middleware(request: NextRequest, event: NextFetchEvent) {
|
|||
}
|
||||
|
||||
if (request.nextUrl.pathname.startsWith('/projects')) {
|
||||
// Skip auth check if USE_AUTH is not enabled
|
||||
if (process.env.USE_AUTH !== 'true') {
|
||||
return NextResponse.next();
|
||||
}
|
||||
return auth0MiddlewareHandler(request, event);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue