fix sync-engine bug when auth token is provided as dynamic function

This commit is contained in:
Nikita Sivukhin
2025-10-03 10:50:54 +04:00
parent d2f5e67b25
commit 9a82a9509f

View File

@@ -35,7 +35,7 @@ async function process(opts: RunOpts, io: ProtocolIo, request: any) {
try {
let headers = typeof opts.headers === "function" ? await opts.headers() : opts.headers;
if (requestType.headers != null && requestType.headers.length > 0) {
headers = { ...opts.headers };
headers = { ...headers };
for (let header of requestType.headers) {
headers[header[0]] = header[1];
}