diff --git a/vite.config.ts b/vite.config.ts index af6dd04..f4ec503 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -25,7 +25,7 @@ export default defineConfig({ runtimeCaching: [ { - urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i, + urlPattern: new RegExp('^https://rj.td2.info.pl/dist/img/thumbnails/*', 'i'), handler: 'CacheFirst', options: { cacheName: 'swdr-images-cache', @@ -39,7 +39,7 @@ export default defineConfig({ }, }, { - urlPattern: /^https:\/\/static.spythere.eu\/images\/.*/i, + urlPattern: new RegExp('^https://static.spythere.eu/images/*', 'i'), handler: 'CacheFirst', options: { cacheName: 'spythere-api-cache', @@ -52,6 +52,16 @@ export default defineConfig({ }, }, }, + { + urlPattern: new RegExp('^https://stacjownik.spythere.eu/vehicles', 'i'), + handler: 'NetworkFirst', + options: { + cacheName: 'vehicles-cache', + cacheableResponse: { + statuses: [200], + }, + }, + }, ], }, }),