Narrow middleware matcher
This commit is contained in:
parent
a6c6a56271
commit
83841d74a0
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -15,6 +15,7 @@
|
||||
"exif",
|
||||
"exifr",
|
||||
"exiftool",
|
||||
"favicons",
|
||||
"favs",
|
||||
"ghijklmnopqrstuv",
|
||||
"Hasselblad",
|
||||
|
||||
@ -40,5 +40,14 @@ export default function middleware(req: NextRequest, res:NextResponse) {
|
||||
}
|
||||
|
||||
export const config = {
|
||||
matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
|
||||
/* Excludes:
|
||||
- /api + /api/auth*
|
||||
- /_next/static*
|
||||
- /_next/image*
|
||||
- /favicon.ico + /favicons/*
|
||||
- /grid
|
||||
- / (root)
|
||||
*/
|
||||
// eslint-disable-next-line max-len
|
||||
matcher: ['/((?!api$|api/auth|_next/static|_next/image|favicon.ico$|favicons/|grid$|$).*)'],
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user