Compare commits

..

No commits in common. "8a6e57365cd23f3c0ba248b36afb7e1f2aac6445" and "12fa3a9fe536b8a92ed5566d910a5bafb8726772" have entirely different histories.

3 changed files with 13 additions and 11 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "traxxx-web",
"version": "0.9.4",
"version": "0.9.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.9.4",
"version": "0.9.3",
"dependencies": {
"@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5",

View File

@ -70,5 +70,5 @@
"postcss-custom-media": "^10.0.2",
"postcss-nesting": "^12.0.2"
},
"version": "0.9.4"
"version": "0.9.3"
}

View File

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