From 2f9d6eab485dc4b4030b61d65be332f1a2302c07 Mon Sep 17 00:00:00 2001 From: Anna Buianova Date: Wed, 8 Apr 2020 18:54:10 +0300 Subject: [PATCH] Add exceptions to the serviceworker code to fix redirects (#7156) * Add exceptions to the serviceworker code to fix redirects --- app/views/service_worker/index.js.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/views/service_worker/index.js.erb b/app/views/service_worker/index.js.erb index bab515652..fb0f60f02 100644 --- a/app/views/service_worker/index.js.erb +++ b/app/views/service_worker/index.js.erb @@ -122,6 +122,12 @@ !url.href.includes('/search/classified_listings') && !url.href.includes('/search/users') && + // Don't run on redirects + !url.href.includes('/workshops') && + !url.href.includes('/%F0%9F%92%B8') && // 💸 (hiring) + !url.href.includes('/podcasts') && + !url.href.includes('/p/rlyweb') && + caches.match('/shell_top') && // Ensure shell_top is in the cache. caches.match('/shell_bottom')) { // Ensure shell_bottom is in the cache. event.respondWith(createPageStream(event.request)); // Respond with the stream