Skip to content

Commit

Permalink
fix: check whole URL against filter patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Aug 18, 2021
1 parent f8e1823 commit 5468114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwa/src/service-worker/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function urlMeetsDefaultCachingCriteria(url) {

// Don't cache if url matches filter in pattern list from d2.config.js
const urlMatchesFilter = URL_FILTER_PATTERNS.some(pattern =>
new RegExp(pattern).test(url.pathname)
new RegExp(pattern).test(url.href)
)
if (urlMatchesFilter) {
return false
Expand Down

0 comments on commit 5468114

Please sign in to comment.