Fix ETag header
This commit is contained in:
@@ -83,14 +83,14 @@ export async function getServerSideProps(context: GetServerSidePropsContext<{ gr
|
|||||||
|
|
||||||
const ifNoneMatch = context.req.headers['if-none-match']
|
const ifNoneMatch = context.req.headers['if-none-match']
|
||||||
if (ifNoneMatch === etag) {
|
if (ifNoneMatch === etag) {
|
||||||
context.res.writeHead(304, { ETag: etag })
|
context.res.writeHead(304, { ETag: `"${etag}"` })
|
||||||
context.res.end()
|
context.res.end()
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore Content has not changed
|
// @ts-ignore Content has not changed
|
||||||
return { props: {} }
|
return { props: {} }
|
||||||
}
|
}
|
||||||
|
|
||||||
context.res.setHeader('ETag', etag)
|
context.res.setHeader('ETag', `"${etag}"`)
|
||||||
return {
|
return {
|
||||||
props: nextSerialized({
|
props: nextSerialized({
|
||||||
schedule: schedule,
|
schedule: schedule,
|
||||||
|
|||||||
Reference in New Issue
Block a user