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:
parent
cb5e5f3e5b
commit
37cacf72ae
|
@ -81,6 +81,9 @@ if (cdnUrls.length > 0) {
|
||||||
credentials: 'omit'
|
credentials: 'omit'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new workbox.cacheableResponse.Plugin({
|
||||||
|
statuses: [200] // opaque responses will return status code '0'
|
||||||
|
}),
|
||||||
new workbox.expiration.Plugin({
|
new workbox.expiration.Plugin({
|
||||||
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
||||||
maxEntries: 250,
|
maxEntries: 250,
|
||||||
|
|
Loading…
Reference in New Issue