mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #598] [MERGED] fix: strip Set-Cookie headers from fetch cache entries #699
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#699
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/598
Author: @southpolesteve
Created: 3/19/2026
Status: ✅ Merged
Merged: 3/20/2026
Merged by: @southpolesteve
Base:
main← Head:fix/strip-set-cookie-from-fetch-cache📝 Commits (1)
ebd76edfix: strip Set-Cookie headers from fetch cache entries📊 Changes
2 files changed (+35 additions, -0 deletions)
View changed files
📝
packages/vinext/src/shims/fetch-cache.ts(+4 -0)📝
tests/fetch-cache.test.ts(+31 -0)📄 Description
Summary
Set-Cookieresponse headers before storing.Set-Cookiebut the cached response does not.Details
When storing fetch responses in the cache, all response headers were included without filtering.
Set-Cookieis a per-response header that should not persist in cache entries, since cached responses are shared across requests. The original (non-cached) response still includes theSet-Cookieheader as expected.Other non-cacheable headers like
content-typeand custom headers are preserved in the cache.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.