Skip to content

Commit 7152789

Browse files
committed
fix(security): handle string[][] HeadersInit format in pinnedFetch
1 parent e56cb1c commit 7152789

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/sim/lib/a2a/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ export async function createA2AClient(agentUrl: string, apiKey?: string): Promis
7979
const headers =
8080
rawHeaders instanceof Headers
8181
? Object.fromEntries(rawHeaders.entries())
82-
: (rawHeaders as Record<string, string> | undefined)
82+
: Array.isArray(rawHeaders)
83+
? Object.fromEntries(rawHeaders as string[][])
84+
: (rawHeaders as Record<string, string> | undefined)
8385

8486
let body: string | Buffer | Uint8Array | undefined
8587
if (init?.body !== undefined && init.body !== null) {

0 commit comments

Comments
 (0)