Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib/adapters/b2/package-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export function b2ObjectStore(
{
...init,
redirect: "manual",
// Read current origin state; public image caching belongs to the CDN.
cache: "no-store",
signal: AbortSignal.timeout(15000)
},
credentials
Expand Down
2 changes: 2 additions & 0 deletions test/services/extensions/v2/b2-store.node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ describe("B2 object storage", () => {
/^AWS4-HMAC-SHA256 /
);
expect(request.redirect).toBe("manual");
expect(request.cache).toBe("no-store");
}
expect(requests[0].headers.get("Cache-Control")).toBe("private, no-store");
expect(requests[0].headers.get("x-amz-content-sha256")).toBe(checksum);
Expand Down Expand Up @@ -98,6 +99,7 @@ describe("B2 object storage", () => {
expect(request.headers.get("Authorization")).toContain(
"AWS4-HMAC-SHA256"
);
expect(request.cache).toBe("no-store");
Comment thread
admdly marked this conversation as resolved.
Resolved
}
expect(requests[0].headers.get("Content-Type")).toBe(
format === "svg" ? "image/svg+xml" : `image/${format}`
Expand Down
Loading