Skip to content

Commit 4dc82d8

Browse files
authored
Send token in header on React Native (#40347)
Both Node and React Native support adding custom headers into WebSocket.
1 parent 2d6eb21 commit 4dc82d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SignalR/clients/ts/signalr/src/WebSocketTransport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class WebSocketTransport implements ITransport {
5252
const cookies = this._httpClient.getCookieString(url);
5353
let opened = false;
5454

55-
if (Platform.isNode) {
55+
if (Platform.isNode || Platform.isReactNative) {
5656
const headers: {[k: string]: string} = {};
5757
const [name, value] = getUserAgentHeader();
5858
headers[name] = value;

0 commit comments

Comments
 (0)