mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
add azure to signalRServerBuilder
This commit is contained in:
parent
7fd79388e2
commit
a2f5f7730f
@ -49,19 +49,16 @@ namespace Bit.Notifications
|
||||
});
|
||||
|
||||
// SignalR
|
||||
if(!string.IsNullOrWhiteSpace(globalSettings.Notifications?.AzureSignalRConnectionString))
|
||||
{
|
||||
services.AddSignalR().AddAzureSignalR(globalSettings.Notifications.AzureSignalRConnectionString);
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddSignalR().AddMessagePackProtocol(options =>
|
||||
var signalRServerBuilder = services.AddSignalR().AddMessagePackProtocol(options =>
|
||||
{
|
||||
options.FormatterResolvers = new List<MessagePack.IFormatterResolver>()
|
||||
{
|
||||
MessagePack.Resolvers.ContractlessStandardResolver.Instance
|
||||
};
|
||||
});
|
||||
if(!string.IsNullOrWhiteSpace(globalSettings.Notifications?.AzureSignalRConnectionString))
|
||||
{
|
||||
signalRServerBuilder.AddAzureSignalR(globalSettings.Notifications.AzureSignalRConnectionString);
|
||||
}
|
||||
services.AddSingleton<IUserIdProvider, SubjectUserIdProvider>();
|
||||
services.AddSingleton<ConnectionCounter>();
|
||||
|
Loading…
Reference in New Issue
Block a user