Disabled early hints.

This commit is contained in:
DebaucheryLibrarian 2024-03-17 05:44:47 +01:00
parent 12fa3a9fe5
commit 21a44c93f6
1 changed files with 6 additions and 8 deletions

View File

@ -162,18 +162,16 @@ export default async function initServer() {
return; return;
} }
const { /*
body, statusCode, headers, earlyHints,
} = httpResponse;
if (res.writeEarlyHints) { if (res.writeEarlyHints) {
res.writeEarlyHints({ link: earlyHints.map((e) => e.earlyHintLink) }); res.writeEarlyHints({ link: httpResponse.earlyHints.map((e) => e.earlyHintLink) });
} }
*/
headers.forEach(([name, value]) => res.setHeader(name, value)); httpResponse.headers.forEach(([name, value]) => res.setHeader(name, value));
res.status(statusCode); res.status(httpResponse.statusCode);
// For HTTP streams use httpResponse.pipe() instead, see https://vike.dev/stream // For HTTP streams use httpResponse.pipe() instead, see https://vike.dev/stream
res.send(body); res.send(httpResponse.body);
}); });
router.use(errorHandler); router.use(errorHandler);