Skip to content

Fix missing cache-control override on the /_next/static/ plain text 404 route - #93

Draft
gaearon wants to merge 1 commit into
mainfrom
fix-not-found-txt-cache-control
Draft

Fix missing cache-control override on the /_next/static/ plain text 404 route#93
gaearon wants to merge 1 commit into
mainfrom
fix-not-found-txt-cache-control

Conversation

@gaearon

@gaearon gaearon commented Jul 29, 2026

Copy link
Copy Markdown

This route shortcuts unmatched /_next/static/ requests at the CDN to a
static file (_next/static/not-found.txt), which otherwise gets a public,
cacheable Cache-Control header by default. That diverges from the
Cache-Control Next.js itself sets for the equivalent response when the
app is invoked directly. Extract the correct headers into a shared
constant so future call sites (e.g. sec-fetch-dest based 404s) stay
consistent.


Stack created with GitHub Stacks CLIGive Feedback 💬

…04 route

This route shortcuts unmatched /_next/static/ requests at the CDN to a
static file (_next/static/not-found.txt), which otherwise gets a public,
cacheable Cache-Control header by default. That diverges from the
Cache-Control Next.js itself sets for the equivalent response when the
app is invoked directly. Extract the correct headers into a shared
constant so future call sites (e.g. sec-fetch-dest based 404s) stay
consistent.
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
adapter-vercel-adapter Ready Ready Preview Jul 29, 2026 8:17pm

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4e683d9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant