diff --git a/Notesnook.API/Notesnook.API.csproj b/Notesnook.API/Notesnook.API.csproj
index 2e811bb..e2dd17b 100644
--- a/Notesnook.API/Notesnook.API.csproj
+++ b/Notesnook.API/Notesnook.API.csproj
@@ -17,6 +17,7 @@
+
diff --git a/Notesnook.API/Startup.cs b/Notesnook.API/Startup.cs
index 0569d21..b922b60 100644
--- a/Notesnook.API/Startup.cs
+++ b/Notesnook.API/Startup.cs
@@ -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;
diff --git a/Streetwriters.Common/Constants.cs b/Streetwriters.Common/Constants.cs
index c74912c..7898c27 100644
--- a/Streetwriters.Common/Constants.cs
+++ b/Streetwriters.Common/Constants.cs
@@ -79,6 +79,7 @@ namespace Streetwriters.Common
public static string? SUBSCRIPTIONS_CERT_PATH => ReadSecret("SUBSCRIPTIONS_CERT_PATH");
public static string? SUBSCRIPTIONS_CERT_KEY_PATH => ReadSecret("SUBSCRIPTIONS_CERT_KEY_PATH");
public static string[] NOTESNOOK_CORS_ORIGINS => ReadSecret("NOTESNOOK_CORS")?.Split(",") ?? [];
+ public static string? SIGNALR_REDIS_CONNECTION_STRING => ReadSecret("SIGNALR_REDIS_CONNECTION_STRING");
public static string? ReadSecret(string name)
{