mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 04:39:58 +00:00
api: use spread operator for merging headers
This commit is contained in:
parent
3096bc9df0
commit
92f3d2366c
1 changed files with 2 additions and 2 deletions
|
@ -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