You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
610 B
21 lines
610 B
8 months ago
|
import { NextResponse } from 'next/server';
|
||
|
import type { NextRequest } from 'next/server';
|
||
|
|
||
|
// This function can be marked `async` if using `await` inside
|
||
|
export function middleware(request: NextRequest) {
|
||
|
return NextResponse.redirect(new URL('/account/login', request.url));
|
||
|
}
|
||
|
|
||
|
export const config = {
|
||
|
matcher: [
|
||
|
/*
|
||
|
* Match all request paths except for the ones starting with:
|
||
|
* - api (API routes)
|
||
|
* - _next/static (static files)
|
||
|
* - _next/image (image optimization files)
|
||
|
* - favicon.ico (favicon file)
|
||
|
*/
|
||
|
'/((?!api|_next/static|_next/image|favicon.ico).*)'
|
||
|
]
|
||
|
};
|