Skip to content

Commit ad38cbd

Browse files
committed
add optional headers
1 parent ae3a42b commit ad38cbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export function createClient(config: {
3131
serviceToken?: string;
3232
requiresAuth?: boolean;
3333
functionsVersion?: string;
34+
headers?: Record<string, string>;
3435
options?: CreateClientOptions;
3536
onRedirectToLogin?: () => void;
3637
}) {
@@ -43,6 +44,7 @@ export function createClient(config: {
4344
options,
4445
functionsVersion,
4546
onRedirectToLogin,
47+
headers: optionalHeaders,
4648
} = config;
4749

4850
const socketConfig: RoomsSocketConfig = {
@@ -58,6 +60,7 @@ export function createClient(config: {
5860
});
5961

6062
const headers = {
63+
...optionalHeaders,
6164
"X-App-Id": String(appId),
6265
};
6366

0 commit comments

Comments
 (0)