service-worker: replace matcher with regexp

This commit is contained in:
vchikalkin 2024-04-23 21:39:56 +03:00
parent cedea10594
commit 678b55ecdf
2 changed files with 2 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -13,10 +13,8 @@ self.addEventListener('install', () => {
clientsClaim();
const routes = ['/', '/unlimited'];
registerRoute(
({ url }) => routes.includes(url.pathname),
/\/(unlimited)?$/u,
new CacheFirst({
cacheName,
plugins: [