diff --git a/frontend/src/middleware.ts b/frontend/src/middleware.ts index 0c54b81..3fa6dcb 100644 --- a/frontend/src/middleware.ts +++ b/frontend/src/middleware.ts @@ -2,13 +2,22 @@ import { NextResponse } from "next/server"; import type { NextRequest } from "next/server"; const PUBLIC = ["/login", "/privacy", "/terms"]; +const PUBLIC_ASSETS = [ + "/manifest.webmanifest", + "/sw.js", + "/favicon.ico", + "/icon-192.png", + "/icon-512.png", + "/apple-touch-icon.png", +]; export function middleware(request: NextRequest) { const { pathname } = request.nextUrl; if ( pathname.startsWith("/_next") || pathname.startsWith("/favicon") || - pathname.match(/\.(ico|png|jpg|jpeg|svg|webp|css|js)$/) + PUBLIC_ASSETS.includes(pathname) || + pathname.match(/\.(ico|png|jpg|jpeg|svg|webp|css|js|webmanifest|map)$/) ) { return NextResponse.next(); }