mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-03-20 17:14:52 +00:00
sync: add redis backplane for signalr
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
<PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="6.0.1-rc2.2" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="3.7.310.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="6.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="9.0.13" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.2.0" />
|
||||
<PackageReference Include="Nanoid" Version="3.1.0" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.9.0-alpha.2" />
|
||||
|
||||
@@ -210,13 +210,16 @@ namespace Notesnook.API
|
||||
|
||||
services.AddHealthChecks();
|
||||
|
||||
services.AddSignalR((hub) =>
|
||||
var signalR = services.AddSignalR((hub) =>
|
||||
{
|
||||
hub.MaximumReceiveMessageSize = 100 * 1024 * 1024;
|
||||
hub.ClientTimeoutInterval = TimeSpan.FromMinutes(10);
|
||||
hub.EnableDetailedErrors = true;
|
||||
}).AddMessagePackProtocol().AddJsonProtocol();
|
||||
|
||||
if (!string.IsNullOrEmpty(Constants.SIGNALR_REDIS_CONNECTION_STRING))
|
||||
signalR.AddStackExchangeRedis(Constants.SIGNALR_REDIS_CONNECTION_STRING);
|
||||
|
||||
services.AddResponseCompression(options =>
|
||||
{
|
||||
options.EnableForHttps = true;
|
||||
|
||||
Reference in New Issue
Block a user