Skip to content

Commit a027e6a

Browse files
authored
Set the branch header for the SDK realtime functions (#2128)
1 parent 5fdc7e6 commit a027e6a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/v3/apiClient/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,11 +1016,15 @@ export class ApiClient {
10161016
}
10171017

10181018
#getRealtimeHeaders() {
1019-
const headers: Record<string, string> = {
1019+
let headers: Record<string, string> = {
10201020
Authorization: `Bearer ${this.accessToken}`,
10211021
"trigger-version": VERSION,
10221022
};
10231023

1024+
if (this.previewBranch) {
1025+
headers["x-trigger-branch"] = this.previewBranch;
1026+
}
1027+
10241028
return headers;
10251029
}
10261030
}

0 commit comments

Comments
 (0)