We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d5c996b + d38a597 commit df0d9c4Copy full SHA for df0d9c4
src/client/sse.ts
@@ -99,11 +99,11 @@ export class SSEClientTransport implements Transport {
99
}
100
101
private async _commonHeaders(): Promise<HeadersInit> {
102
- const headers: HeadersInit = {};
+ const headers: HeadersInit = { ...this._requestInit?.headers };
103
if (this._authProvider) {
104
const tokens = await this._authProvider.tokens();
105
if (tokens) {
106
- headers["Authorization"] = `Bearer ${tokens.access_token}`;
+ (headers as Record<string, string>)["Authorization"] = `Bearer ${tokens.access_token}`;
107
108
109
0 commit comments