fix(middleware): exempt manifest.json and sw.js from the auth matcher
Logged-out requests were redirected to /login, and logged-in non-admin roles were bounced to their home page, which blocked PWA install and the service worker. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -47,5 +47,5 @@ export async function middleware(request: NextRequest) {
|
||||
}
|
||||
|
||||
export const config = {
|
||||
matcher: ['/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)'],
|
||||
matcher: ['/((?!_next/static|_next/image|favicon.ico|manifest\\.json$|sw\\.js$|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)'],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user