Skip to content

fix: apply caching headers to pages router 404 with getStaticProps #2764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 6, 2025
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
test: update static 404 test
  • Loading branch information
orinokai committed Feb 25, 2025
commit bb64d825be2763993ab67967715fd3ce07532c81
2 changes: 1 addition & 1 deletion tests/integration/static.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test<FixtureTestContext>('requesting a non existing page route that needs to be
// test that it should request the 404.html file
const call1 = await invokeFunction(ctx, { url: 'static/revalidate-not-existing' })
expect(call1.statusCode).toBe(404)
expect(load(call1.body)('h1').text()).toBe('404')
expect(load(call1.body)('p').text()).toBe('Custom 404 page')

// https://github.com/vercel/next.js/pull/69802 made changes to returned cache-control header,
// after that (14.2.10 and canary.147) 404 pages would have `private` directive, before that it
Expand Down
Loading