about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-05-29 07:43:47 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-05-29 00:43:47 +0200
commitd95642f6d913a99fc44f0ac0695d53534afb7962 (patch)
treeeb40f058b8b96b9cc5a0495908c5ca7ff8d32818 /app/javascript
parent03f4c214b459a241a1aab08095a986475bd6f8f0 (diff)
Cache attachments on external host with service worker (#7493)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/service_worker/entry.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/service_worker/entry.js b/app/javascript/mastodon/service_worker/entry.js
index ce42271a9..c1854c1cd 100644
--- a/app/javascript/mastodon/service_worker/entry.js
+++ b/app/javascript/mastodon/service_worker/entry.js
@@ -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) {