Skip to content

Commit

Permalink
Update workbox-config.js (#885)
Browse files Browse the repository at this point in the history
* Update workbox-config.js

* Update workbox-config.js

* Update workbox-config.js
  • Loading branch information
iondrimba committed Feb 19, 2023
1 parent 68908a4 commit d7f41b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workbox-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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: {
Expand Down

0 comments on commit d7f41b4

Please sign in to comment.