Skip to content

Commit

Permalink
next-start
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdaniels committed Oct 3, 2024
1 parent 106a45d commit 509ec26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 7 additions & 2 deletions nextjs-start/auth-service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});

Expand Down
3 changes: 1 addition & 2 deletions nextjs-start/idx-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"host": {
"virtualization": true
},
"params": [
]
"params": []
}

0 comments on commit 509ec26

Please sign in to comment.