Skip to content

Commit 49a86c7

Browse files
rosaclaude
andcommitted
Enable CORS fetch mode for storage requests
The load balancer now returns a specific `Access-Control-Allow-Origin` instead of a wildcard, so credentials can be included by default. This enables `maxEntrySize` enforcement for storage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1855490 commit 49a86c7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/views/pwa/service_worker.js.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ TurboOffline.addRule({
4242
maxAge: 60 * 60 * 24 * 7,
4343
networkTimeout: 2,
4444
maxEntrySize: 2 * 1024 * 1024, // 2MB covers about 95% of all Fizzy blobs
45-
maxEntries: 500
45+
maxEntries: 500,
46+
fetchOptions: { mode: "cors" }
4647
})
4748
})
4849

0 commit comments

Comments
 (0)