diff --git a/src/middleware.ts b/src/middleware.ts index 4bf528b..6db152c 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -44,3 +44,18 @@ export async function middleware(request: NextRequest) { return response } + +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, sitemap.xml, robots.txt (metadata files) + */ + '/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)', + '/api/generateDescription', + '/', + ], +}