mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[PR #818] fix: strip Set-Cookie from App Route ISR cache entries #867
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#867
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/818
Author: @southpolesteve
Created: 4/10/2026
Status: 🔄 Open
Base:
main← Head:fix/strip-set-cookie-from-app-route-isr-cache-clean📝 Commits (1)
c88f837fix: strip Set-Cookie from App Route ISR cache entries📊 Changes
3 files changed (+39 additions, -4 deletions)
View changed files
📝
packages/vinext/src/server/app-route-handler-response.ts(+3 -4)📝
tests/app-router.test.ts(+19 -0)➕
tests/fixtures/app-basic/app/api/static-set-cookie/route.ts(+17 -0)📄 Description
Summary
App Route ISR cache values no longer persist
Set-Cookieheaders.Details
Cached App Route responses are shared across requests. Persisting
Set-Cookieinside the ISR cache would replay per-request cookies to later visitors on HIT/STALE responses.This change updates
buildAppRouteCacheValue()to keep dropping:set-cookiex-vinext-cachecache-controlTests
Adds a dedicated cacheable route handler fixture (
/api/static-set-cookie) withrevalidate = 1that setsSet-Cookiedirectly on the response.Regression coverage verifies:
MISSandSet-CookiepresentHITandSet-Cookieabsent🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.