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: {