Skip to content

Commit

Permalink
Merge pull request #1259 from neet/add-bearer-type-ws
Browse files Browse the repository at this point in the history
fix: Add Bearer type to WebSocket Authorization header
  • Loading branch information
neet authored Jan 5, 2025
2 parents 53cd1e8 + ed4631c commit 79ccd46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/adapters/config/web-socket-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("WebSocketConfigImpl", () => {
new SerializerNativeImpl(),
);

expect(config.getHeaders()).toEqual({ Authorization: "token" });
expect(config.getHeaders()).toEqual({ Authorization: "Bearer token" });
});

it("creates websocket header without token when not supported", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/config/web-socket-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class WebSocketConfigImpl implements WebSocketConfig {
}

return {
Authorization: this.props.accessToken,
Authorization: `Bearer ${this.props.accessToken}`,
};
}

Expand Down

0 comments on commit 79ccd46

Please sign in to comment.