diff --git a/Program.cs b/Program.cs index 03fc123..898f8d1 100644 --- a/Program.cs +++ b/Program.cs @@ -36,7 +36,7 @@ builder.Services.AddSession(options => options.IdleTimeout = TimeSpan.FromHours(8); options.Cookie.HttpOnly = true; options.Cookie.IsEssential = true; - options.Cookie.Name = ".VoidScavengers.Admin"; + options.Cookie.Name = ".VoidScavengers.Admin.2"; }); // ---- MySQL conn string from env ---- @@ -61,6 +61,12 @@ builder.Services.AddOptions() // Redis + zone leases + WAL builder.Services.AddSingleton(); +builder.Services.AddSingleton(_ => +{ + var cs = RedisManager.BuildRedisConnectionStringFromEnv() + ?? throw new Exception("REDIS_CONNECTION_STRING required"); + return ConnectionMultiplexer.Connect(cs); +}); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddSingleton();