From ca413a329194eb33287a7670889d2a7422a90c7f Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Fri, 15 Sep 2023 13:40:11 +0000 Subject: [PATCH] Force CORS for CSS images --- src/entrypoints/service_worker.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/entrypoints/service_worker.ts b/src/entrypoints/service_worker.ts index 3641b5fa2c60..ac0425d0cf34 100644 --- a/src/entrypoints/service_worker.ts +++ b/src/entrypoints/service_worker.ts @@ -42,6 +42,8 @@ const initRouting = () => { request.destination === "image", new StaleWhileRevalidate({ cacheName: "brands", + // CORS must be forced to work for CSS images + fetchOptions: { mode: "cors", credentials: "omit" }, plugins: [ new ExpirationPlugin({ maxAgeSeconds: 60 * 60 * 24 * 30,