Disabled early hints.
This commit is contained in:
parent
12fa3a9fe5
commit
21a44c93f6
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue