From 37cacf72ae472c999d7dd875a9daf1b81415a15d Mon Sep 17 00:00:00 2001 From: Bianca Nenciu Date: Fri, 5 May 2023 17:33:47 +0200 Subject: [PATCH] FIX: Service worker should cache only 200 requests (#21409) This can cause CORB issues when combining S3, secure uploads and service workers. --- app/assets/javascripts/service-worker.js.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/service-worker.js.erb b/app/assets/javascripts/service-worker.js.erb index 796670025f1..e16d8d9300c 100644 --- a/app/assets/javascripts/service-worker.js.erb +++ b/app/assets/javascripts/service-worker.js.erb @@ -81,6 +81,9 @@ if (cdnUrls.length > 0) { credentials: 'omit' }, plugins: [ + new workbox.cacheableResponse.Plugin({ + statuses: [200] // opaque responses will return status code '0' + }), new workbox.expiration.Plugin({ maxAgeSeconds: 7* 24 * 60 * 60, // 7 days maxEntries: 250,