Files
JJ KasperandGitHub a916dfc7d2 Add ability to customize Cache-Control (#69802)
This continues https://github.com/vercel/next.js/pull/39707 bringing the
changes up to date with canary and adds test cases to ensure it's
working as expected.

Closes: https://github.com/vercel/next.js/issues/22319
Closes: https://github.com/vercel/next.js/pull/39707
Closes: NDX-148
2024-09-09 12:58:07 -07:00

30 lines
436 B
TypeScript

export function getStaticProps({ params }) {
return {
props: {
now: Date.now(),
params,
},
revalidate: 120,
}
}
export function getStaticPaths() {
return {
paths: [
{
params: { slug: 'first' },
},
],
fallback: 'blocking',
}
}
export default function Page({ params }) {
return (
<>
<p>/pages-ssg/[slug]</p>
<p>{JSON.stringify(params)}</p>
</>
)
}