Skip to content

Commit f8fc217

Browse files
committed
update middleware to handle /_next routes in addition to public files
1 parent dc657fb commit f8fc217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const config = {
4040
export async function middleware(req: NextRequest) {
4141
const { pathname, locale } = req.nextUrl
4242

43-
if (PUBLIC_FILE.test(pathname)) {
43+
if (pathname.startsWith("/_next") || PUBLIC_FILE.test(pathname)) {
4444
return NextResponse.next()
4545
}
4646

0 commit comments

Comments
 (0)