|
|
|
@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Routing; |
|
|
|
using Microsoft.AspNetCore.SignalR; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using Volo.Abp.AspNetCore.Auditing; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
|
|
|
|
@ -30,6 +31,7 @@ namespace Volo.Abp.AspNetCore.SignalR |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var routePatterns = new List<string> {"/signalr-hubs"}; |
|
|
|
var signalRServerBuilder = context.Services.AddSignalR(); |
|
|
|
|
|
|
|
context.Services.ExecutePreConfiguredActions(signalRServerBuilder); |
|
|
|
@ -45,6 +47,8 @@ namespace Volo.Abp.AspNetCore.SignalR |
|
|
|
|
|
|
|
foreach (var hubConfig in signalROptions.Hubs) |
|
|
|
{ |
|
|
|
routePatterns.AddIfNotContains(hubConfig.RoutePattern); |
|
|
|
|
|
|
|
MapHubType( |
|
|
|
hubConfig.HubType, |
|
|
|
endpointContext.Endpoints, |
|
|
|
@ -60,6 +64,14 @@ namespace Volo.Abp.AspNetCore.SignalR |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
Configure<AbpAspNetCoreAuditingOptions>(options => |
|
|
|
{ |
|
|
|
foreach (var routePattern in routePatterns) |
|
|
|
{ |
|
|
|
options.IgnoredUrls.AddIfNotContains(x => routePattern.StartsWith(x), () => routePattern); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
private void AutoAddHubTypes(IServiceCollection services) |
|
|
|
|