mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +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 = new Map([
|
||||||
streamInfo.headers || {},
|
...(streamInfo.headers || []),
|
||||||
req.headers
|
...Object.entries(req.headers)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return stream(res, { type: 'internal', ...streamInfo });
|
return stream(res, { type: 'internal', ...streamInfo });
|
||||||
|
|
Loading…
Reference in a new issue