fix issues
This commit is contained in:
@@ -21,9 +21,11 @@ export function middleware(request: NextRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Always allow static assets and API routes (API handles its own auth)
|
// Always allow static assets and API routes (API handles its own auth)
|
||||||
|
// Also allow /media/ routes which are proxied to the API
|
||||||
if (
|
if (
|
||||||
pathname.startsWith('/_next/') ||
|
pathname.startsWith('/_next/') ||
|
||||||
pathname.startsWith('/api/') ||
|
pathname.startsWith('/api/') ||
|
||||||
|
pathname.startsWith('/media/') ||
|
||||||
pathname.match(/\.(svg|png|jpg|jpeg|gif|webp|ico|css|js)$/)
|
pathname.match(/\.(svg|png|jpg|jpeg|gif|webp|ico|css|js)$/)
|
||||||
) {
|
) {
|
||||||
return NextResponse.next();
|
return NextResponse.next();
|
||||||
|
|||||||
Reference in New Issue
Block a user