From 9506df0b08e87fd314a1400c3724f69b1a12c135 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr>
Date: Tue, 22 Mar 2022 14:51:38 +0100
Subject: [PATCH] adapt regex to all wms request

---
 src/service-worker.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/service-worker.js b/src/service-worker.js
index 7dd25fb9..ae6b3aff 100644
--- a/src/service-worker.js
+++ b/src/service-worker.js
@@ -52,9 +52,9 @@ if (workbox) {
     })
   );
   workbox.routing.registerRoute(
-    /^https:\/\/osm\.geo2france\.fr\/mapcache/,
+    new RegExp('.*/service=WMS&request=GetMap/.*'),
     new workbox.strategies.CacheFirst({
-      cacheName: 'mapcache',
+      cacheName: 'wms',
       plugins: [
         new workbox.cacheableResponse.Plugin({
           statuses: [0, 200],
-- 
GitLab