Unverified Commit f7bc8f4b authored by Gerald Monaco's avatar Gerald Monaco Committed by GitHub

Fix merge issue and use respondWith (#26961)

parent 53123ad6
......@@ -1686,17 +1686,11 @@ export default class Server {
}
} else if (cachedData.kind === 'REDIRECT') {
if (isDataReq) {
sendPayload(
req,
res,
JSON.stringify(cachedData.props),
'json',
{
generateEtags: this.renderOpts.generateEtags,
poweredByHeader: this.renderOpts.poweredByHeader,
},
revalidateOptions
)
respondWith({
type: 'json',
body: JSON.stringify(cachedData.props),
revalidateOptions,
})
} else {
await handleRedirect(cachedData.props)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment