From 509ec264c341a200f7357218f99749bbe6451ec3 Mon Sep 17 00:00:00 2001 From: James Daniels Date: Thu, 3 Oct 2024 13:24:13 -0400 Subject: [PATCH] next-start --- nextjs-start/auth-service-worker.js | 9 +++++++-- nextjs-start/idx-template.json | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-) 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": [] }