1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-14 14:17:35 -05:00

support message pack protocol for signalr

This commit is contained in:
Kyle Spearrin
2018-08-23 21:56:48 -04:00
parent d458d77511
commit 68c349f72f
6 changed files with 62 additions and 37 deletions

View File

@ -1,4 +1,5 @@
using Bit.Core;
using System.Collections.Generic;
using Bit.Core;
using Bit.Core.Utilities;
using IdentityModel;
using Microsoft.AspNetCore.Builder;
@ -54,7 +55,13 @@ namespace Bit.Notifications
}
else
{
services.AddSignalR();
services.AddSignalR().AddMessagePackProtocol(options =>
{
options.FormatterResolvers = new List<MessagePack.IFormatterResolver>()
{
MessagePack.Resolvers.ContractlessStandardResolver.Instance
};
});
}
services.AddSingleton<IUserIdProvider, SubjectUserIdProvider>();
services.AddSingleton<ConnectionCounter>();