middleware: added exception for webworker source file

This commit is contained in:
2024-02-29 08:41:53 +01:00
parent 6f872f2ee4
commit b827c93171

View File

@@ -43,7 +43,8 @@ export default async function middleware(req: NextRequest) {
export const config = {
// for these paths middleware will not be called
// `pdf.worker.min.mjs` is a web worker code used by pdf.js
matcher: [
'/((?!api|_next/static|_next/image|.*\\.png$|.*\\.webm$).*)',
'/((?!api|_next/static|_next/image|.*\\.png$|pdf.worker.min.mjs$|.*\\.webm$).*)',
],
};