Skip to content

Commit 41e3632

Browse files
committed
Update abp.signalr-client.js
1 parent 927800b commit 41e3632

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Startup/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
8686
#if FEATURE_SIGNALR_ASPNETCORE
8787
app.UseSignalR(routes =>
8888
{
89-
routes.MapHub<AbpCommonHub>("/abpCommonHub");
89+
routes.MapHub<AbpCommonHub>("/signalr");
9090
});
9191
#endif
9292

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr-client.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var abp = abp || {};
1+
var abp = abp || {};
22
(function () {
33

44
// Check if SignalR is defined
@@ -43,8 +43,15 @@
4343

4444
// Connect to the server
4545
abp.signalr.connect = function() {
46+
var url = abp.signalr.url || '/signalr';
47+
48+
// Add query string: https://github.com/aspnet/SignalR/issues/680
49+
if (abp.signalr.qs) {
50+
url += '?' + abp.signalr.qs;
51+
}
52+
4653
// Start the connection.
47-
startConnection('/abpCommonHub', configureConnection).then(function (connection) {
54+
startConnection(url, configureConnection).then(function (connection) {
4855
abp.log.debug('Connected to SignalR server!'); //TODO: Remove log
4956
abp.event.trigger('abp.signalr.connected');
5057
// Call the Register method on the hub.

0 commit comments

Comments
 (0)