Skip to content

WebSocketTransport in Javascript/typescript client did not include headers set using IHttpConnectionOptions #62410

Open
@goyaltushar92

Description

@goyaltushar92

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When we create a signalR connection with headers, like

var connection = new signalR.HubConnectionBuilder()
      .withUrl(hubUrl, {headers: { xyz: 'asd' }}).withAutomaticReconnect()
      .build();
connection.start();

I observed, headers set using options, is missing from some calls when using WebSocketTransport also access_token is in query instead of headers.

Image

Expected Behavior

  • Any custom header described by options should be there
  • Auth token should use headers

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedarea-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions