update sw.js

This commit is contained in:
Nofated095 2023-11-26 11:52:40 +08:00
parent 50a488b042
commit 8b3619214b
1 changed files with 17 additions and 0 deletions

View File

@ -53,6 +53,23 @@ routing.registerRoute(
})
);
routing.registerRoute(
/.*blog\.nofated\.win/,
new CacheFirst({
cacheName: 'static-immutable' + cacheSuffixVersion,
fetchOptions: {
mode: 'cors',
credentials: 'omit'
},
plugins: [
new ExpirationPlugin({
maxAgeSeconds: 30 * 24 * 60 * 60,
purgeOnQuotaError: true
})
]
})
);
routing.registerRoute(
/.*xgjalbum\.oss-cn-hangzhou\.aliyuncs\.com/,
new CacheFirst({