FIX: Service worker should cache only 200 requests (#21409)

This can cause CORB issues when combining S3, secure uploads and
service workers.
This commit is contained in:
Bianca Nenciu 2023-05-05 17:33:47 +02:00 committed by GitHub
parent cb5e5f3e5b
commit 37cacf72ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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,