3f164abd25
Next.js currently does not return `cache-control` header on 304 response. Accordingly to RFC, Next.js should include it as well: https://www.rfc-editor.org/rfc/rfc9110#section-15.4.5 > The server generating a 304 response MUST generate any of the following header fields that would have been sent in a [200 (OK)](https://www.rfc-editor.org/rfc/rfc9110#status.200) response to the same request: > > - [Content-Location](https://www.rfc-editor.org/rfc/rfc9110#field.content-location), [Date](https://www.rfc-editor.org/rfc/rfc9110#field.date), [ETag](https://www.rfc-editor.org/rfc/rfc9110#field.etag), and [Vary](https://www.rfc-editor.org/rfc/rfc9110#field.vary) > - **_Cache-Control_** and Expires (see [[CACHING](https://www.rfc-editor.org/rfc/rfc9110#CACHING)])
18 lines
237 B
JavaScript
18 lines
237 B
JavaScript
export async function getStaticProps() {
|
|
return {
|
|
props: {
|
|
world: 'world',
|
|
},
|
|
revalidate: 10,
|
|
}
|
|
}
|
|
|
|
const Page = ({ world }) => {
|
|
return (
|
|
<div>
|
|
<p>hello {world}</p>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Page
|