api: use Map for internal stream headers instead of plain object

This commit is contained in:
dumbmoron
2024-07-06 11:36:25 +00:00
parent 315ddb17c1
commit 3096bc9df0
2 changed files with 10 additions and 5 deletions

View File

@@ -196,10 +196,10 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
return res.sendStatus(404);
}
streamInfo.headers = {
...streamInfo.headers,
...req.headers
};
streamInfo.headers = new Map([
streamInfo.headers || {},
req.headers
]);
return stream(res, { type: 'internal', ...streamInfo });
})