Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the type of withUrlOptions from string to object to accommodate missing properties. #6765

Merged

Conversation

Playmaker5677
Copy link
Contributor

Currently, withUrlOptions is defined as of type string, however, as this documentation from Microsoft shows, we could define quite a few properties there: https://learn.microsoft.com/en-us/aspnet/core/signalr/configuration?view=aspnetcore-7.0&tabs=javascript#configure-additional-options

  • Inside the .withUrl method it is expected to pass object as a second parameter:

let connection = new signalR.HubConnectionBuilder().withUrl("/chathub", {
// "Foo: Bar" will not be sent with WebSockets or Server-Sent Events requests
headers: { "Foo": "Bar" },
transport: signalR.HttpTransportType.LongPolling
}) .build();

  • Also inside the abp.signalr-client.js start method we are using the withUrlOptions as object:

abp.signalr.withUrlOptions.transport = transport;

In case withUrlOptions is defined as string this causes transport to be returned as undefined.

  • Also, if we are deploying in web farm environment we are not able to set the skipNegotiation property if withUrlOptions is defined as string which in turn breaks the signalR connection.

@ismcagdas ismcagdas added this to the v8.4 milestone Aug 18, 2023
@ismcagdas ismcagdas merged commit 4a3428e into aspnetboilerplate:dev Oct 4, 2023
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants