Skip to content

Commit

Permalink
Merge pull request #326 from dreammall-earth/disable-early-hints
Browse files Browse the repository at this point in the history
fix(presenter): disable early hints
  • Loading branch information
ulfgebhardt authored Mar 11, 2024
2 parents 795d4ef + c78314f commit b8e527e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion presenter/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b8e527e

Please sign in to comment.