Skip to content

Commit 74bdbbf

Browse files
Fix middleware matcher to only target API routes
- Simplified middleware matcher from broad pattern to /api/:path* only - Prevents middleware from interfering with home page routing - Resolves 404 errors on production deployment 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 0404e56 commit 74bdbbf

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/middleware.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ export function middleware(request: NextRequest) {
6161

6262
export const config = {
6363
matcher: [
64-
/*
65-
* Match all request paths except:
66-
* - _next/static (static files)
67-
* - _next/image (image optimization files)
68-
* - favicon.ico (favicon file)
69-
* - public folder
70-
*/
71-
'/((?!_next/static|_next/image|favicon.ico|.*\\..*|_next).*)',
64+
'/api/:path*'
7265
],
7366
};

0 commit comments

Comments
 (0)