mirror of
https://github.com/IT4Change/boilerplate-frontend.git
synced 2025-12-12 15:15:49 +00:00
disable early hints when there is no environment value set for it
This commit is contained in:
parent
9cf9ff7258
commit
29e7be74f5
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user