From 55b5749230fd98d801c2e6b0b04133fefdcd2a2b Mon Sep 17 00:00:00 2001 From: dingo Date: Fri, 30 Jan 2026 13:40:16 -0500 Subject: [PATCH] Fucking rediss...... --- Program.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index 2fe3a24..4333065 100644 --- a/Program.cs +++ b/Program.cs @@ -95,9 +95,11 @@ builder.Services.AddHttpClient(); // For CDN file hash computation builder.Services.AddHealthChecks() .AddCheck("mysql", tags: new[] { "ready" }); +var dpDb = redisMux.GetDatabase(2); + builder.Services.AddDataProtection() .SetApplicationName("Void") - .PersistKeysToStackExchangeRedis(() => redisMux.GetDatabase(), "Void:DataProtectionKeys"); + .PersistKeysToStackExchangeRedis(() => dpDb, "Void:DataProtectionKeys"); //var app = builder.Build(); @@ -243,5 +245,13 @@ app.Lifetime.ApplicationStopping.Register(() => app.MapControllers(); app.MapRazorPages(); +//Call two: +keyManager = app.Services.GetRequiredService(); +keys = keyManager.GetAllKeys(); +app.Logger.LogInformation("DP keys present: {Count}", keys.Count); +foreach (var k in keys) + app.Logger.LogInformation("DP key: {Id} Created={Created} Expires={Expires} Revoked={Revoked}", + k.KeyId, k.CreationDate, k.ExpirationDate, k.IsRevoked); + app.Logger.LogInformation("Admin panel available at /admin"); await app.RunAsync();