diff --git a/nextjs-start/auth-service-worker.js b/nextjs-start/auth-service-worker.js index 220a6019..f5ef2ee6 100644 --- a/nextjs-start/auth-service-worker.js +++ b/nextjs-start/auth-service-worker.js @@ -36,9 +36,14 @@ self.addEventListener("fetch", (event) => { return; } if (pathname.startsWith("/_next/")) return; - // Don't add headers to non-get requests or those with an extension—this + // Don't add headers to GET/HEAD requests or those with an extension—this // helps with css, images, fonts, json, etc. - if (event.request.method === "GET" && pathname.includes(".")) return; + if ( + (event.request.method === "GET" || event.request.method === "HEAD") && + pathname.includes(".") + ) { + return; + } event.respondWith(fetchWithFirebaseHeaders(event.request)); }); diff --git a/nextjs-start/idx-template.json b/nextjs-start/idx-template.json index 60c6bcfa..fc9f4d3c 100644 --- a/nextjs-start/idx-template.json +++ b/nextjs-start/idx-template.json @@ -7,6 +7,5 @@ "host": { "virtualization": true }, - "params": [ - ] + "params": [] }