mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +00:00
api: use spread operator for merging headers
This commit is contained in:
parent
3096bc9df0
commit
92f3d2366c
|
@ -197,8 +197,8 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
|
|||
}
|
||||
|
||||
streamInfo.headers = new Map([
|
||||
streamInfo.headers || {},
|
||||
req.headers
|
||||
...(streamInfo.headers || []),
|
||||
...Object.entries(req.headers)
|
||||
]);
|
||||
|
||||
return stream(res, { type: 'internal', ...streamInfo });
|
||||
|
|
Loading…
Reference in a new issue