Skip to content

Commit

Permalink
Remove runtime caching rule for GoatCounter count.js
Browse files Browse the repository at this point in the history
We serve a fixed version of the script for SRI purposes, anyway, so
caching it via the service worker should be fine. Hopefully, this fixes
the no-response error we've been receiving the from the service worker.
  • Loading branch information
caleb531 committed Aug 6, 2024
1 parent bce56ec commit 014db58
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ const withPWA = require('next-pwa')({
// https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-webpack-plugin.GenerateSW#GenerateSW)
skipWaiting: false,
runtimeCaching: [
// Fix no-response errors for GoatCounter analytics scripts (supposedly, if
// two rules match the same URL, the first one takes precedence, so we must
// place our rule before all other rules)
{
urlPattern: /^https:\/\/gc\.zgo\.at\//i,
handler: 'NetworkOnly'
},
// Fix bad-precaching-response errors from service worker due to use of
// middleware (source: https://github.com/shadowwalker/next-pwa/issues/291)
...runtimeCaching
Expand Down

0 comments on commit 014db58

Please sign in to comment.