From 92f3d2366cf8d974220e233449631cfb5adc5c84 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Sat, 6 Jul 2024 11:40:41 +0000 Subject: [PATCH] api: use spread operator for merging headers --- src/core/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/api.js b/src/core/api.js index cf5b51a5..8eb4cb40 100644 --- a/src/core/api.js +++ b/src/core/api.js @@ -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 });