export const config = { matcher: [ '/((?!api|_next/static|_next/image|favicon.ico).*)', ] }
This peace of code in middleware helped me