Cache attachments on external host with service worker (#7493)
This commit is contained in:
parent
03f4c214b4
commit
d95642f6d9
4 changed files with 30 additions and 3 deletions
|
@ -49,7 +49,7 @@ self.addEventListener('fetch', function(event) {
|
|||
|
||||
return response;
|
||||
}));
|
||||
} else if (storageFreeable && process.env.CDN_HOST ? url.host === process.env.CDN_HOST : url.pathname.startsWith('/system/')) {
|
||||
} else if (storageFreeable && (ATTACHMENT_HOST ? url.host === ATTACHMENT_HOST : url.pathname.startsWith('/system/'))) {
|
||||
event.respondWith(openSystemCache().then(cache => {
|
||||
return cache.match(event.request.url).then(cached => {
|
||||
if (cached === undefined) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue