From d7f41b42dbcb386f225d032ac074165d8f8c7501 Mon Sep 17 00:00:00 2001 From: Ion Drimba Filho Date: Sun, 19 Feb 2023 09:34:31 -0300 Subject: [PATCH] Update workbox-config.js (#885) * Update workbox-config.js * Update workbox-config.js * Update workbox-config.js --- workbox-config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workbox-config.js b/workbox-config.js index 6b101a97..e42c431c 100644 --- a/workbox-config.js +++ b/workbox-config.js @@ -2,7 +2,7 @@ module.exports = { swDest: 'public/sw.js', runtimeCaching: [{ // Match any same-origin request that contains 'api'. - urlPattern: new RegExp('^https\:\/\/gateway.marvel.com\/v1\/public\/.+'), + urlPattern: new RegExp(/https\:\/\/gateway\.marvel\.com\/v1\/public\/.+/g), handler: 'cacheFirst', options: { // Use a custom cache name for this route. @@ -19,7 +19,7 @@ module.exports = { }, }, { - urlPattern: new RegExp('^https://gateway.marvel.com/v1/public/.+'), + urlPattern: new RegExp(/https\:\/\/gateway\.marvel\.com\/v1\/public\/.+/g), handler: 'staleWhileRevalidate', options: { cacheableResponse: {