Skip to content

Commit d5f6b83

Browse files
committed
feat: extra headers during initialization
1 parent cc8a0f9 commit d5f6b83

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export type ConnectionOptions = {
6262
readonly session?: Session;
6363
readonly extraCredential?: ExtraCredential;
6464
readonly ssl?: SecureContextOptions;
65+
extraHeaders?: RequestHeaders;
6566
};
6667

6768
export type QueryStage = {
@@ -192,6 +193,7 @@ class Client {
192193
[TRINO_EXTRA_CREDENTIAL_HEADER]: encodeAsString(
193194
options.extraCredential ?? {}
194195
),
196+
...(options.extraHeaders ?? {}),
195197
};
196198

197199
if (options.auth && options.auth.type === 'basic') {

0 commit comments

Comments
 (0)