From faa663ecae9859303d93940c7732a4cf942af75d Mon Sep 17 00:00:00 2001 From: aderihoilya Date: Tue, 24 Sep 2024 19:03:16 +0300 Subject: [PATCH] feat: extra headers during client initialization --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index 18d02907..5199da1b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -61,6 +61,7 @@ export type ConnectionOptions = { readonly auth?: Auth; readonly session?: Session; readonly extraCredential?: ExtraCredential; + readonly extraHeaders?: RequestHeaders; readonly ssl?: SecureContextOptions; }; @@ -192,6 +193,7 @@ class Client { [TRINO_EXTRA_CREDENTIAL_HEADER]: encodeAsString( options.extraCredential ?? {} ), + ...(options.extraHeaders ?? {}) }; if (options.auth && options.auth.type === 'basic') {