Merge branch 'master' into add-pinia-testing

This commit is contained in:
Moriz Wahl 2024-03-14 16:30:26 +01:00 committed by GitHub
commit 28e3ce714d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,7 +80,7 @@ async function startServer() {
next()
} else {
const { body, statusCode, headers, earlyHints } = httpResponse
if (res.writeEarlyHints)
if (process.env.EARLY_HINTS && res.writeEarlyHints)
res.writeEarlyHints({ link: earlyHints.map((e) => e.earlyHintLink) })
headers.forEach(([name, value]) => res.setHeader(name, value))
res.status(statusCode)