mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-30 22:44:21 +01:00
Merge 'fix sync-engine bug when auth token is provided as dynamic function' from Nikita Sivukhin
Closes #3553
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user