fix: set NetworkOnly for prefetch
This commit is contained in:
parent
f84336181a
commit
71dca6a5d1
|
|
@ -10,6 +10,7 @@ const cache = require("next-pwa/cache")
|
|||
const withPWA = require("next-pwa")({
|
||||
dest: "public",
|
||||
publicExcludes: ["*"],
|
||||
dynamicStartUrl: false,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: ({ url }) => {
|
||||
|
|
@ -38,6 +39,12 @@ const withPWA = require("next-pwa")({
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
urlPattern: ({ request }) => {
|
||||
return request.headers.get("x-middleware-prefetch")
|
||||
},
|
||||
handler: "NetworkOnly",
|
||||
},
|
||||
// @ts-ignore
|
||||
...cache,
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue