From 76d58fe0ffdc4bd1df35b60815e97560c3564700 Mon Sep 17 00:00:00 2001 From: Azamat Mambetov Date: Mon, 29 Apr 2024 19:27:41 +0400 Subject: [PATCH] fix(pwa): skip range requests in service worker (#1672) --- assets/js/pwa/sw.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/js/pwa/sw.js b/assets/js/pwa/sw.js index adc707e..dbf30f4 100644 --- a/assets/js/pwa/sw.js +++ b/assets/js/pwa/sw.js @@ -75,6 +75,10 @@ self.addEventListener('message', (event) => { }); self.addEventListener('fetch', (event) => { + if (event.request.headers.has('range')) { + return; + } + event.respondWith( caches.match(event.request).then((response) => { if (response) {