Skip to content

Commit

Permalink
Force CORS for CSS images
Browse files Browse the repository at this point in the history
  • Loading branch information
steverep committed Sep 15, 2023
1 parent c820b42 commit ca413a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/entrypoints/service_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ca413a3

Please sign in to comment.