progres day 1
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { NextResponse, NextRequest } from 'next/server';
|
||||
|
||||
const isLogin = true;
|
||||
|
||||
export function proxy(request: NextRequest) {
|
||||
if (request.nextUrl.pathname !== '/login' && !isLogin) {
|
||||
return NextResponse.redirect(new URL('/login', request.url));
|
||||
}
|
||||
}
|
||||
|
||||
export const config = {
|
||||
matcher: ['/((?!api|_next/static|_next/image|.*\\.png$).*)']
|
||||
};
|
||||
Reference in New Issue
Block a user