We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d85baa8 commit b7ea998Copy full SHA for b7ea998
sw.js
@@ -13,8 +13,10 @@ var cacheName = 'chirpy-{{ "now" | date: "%Y%m%d.%H%M" }}';
13
14
15
function isExcluded(url) {
16
+ const regex = /(^http(s)?|^\/)/; /* the regex for CORS url or relative url */
17
for (const rule of exclude) {
- if (url.indexOf(rule) != -1) {
18
+ if (!regex.test(url) ||
19
+ url.indexOf(rule) != -1) {
20
return true;
21
}
22
0 commit comments