Fucking rediss......
This commit is contained in:
+11
-1
@@ -95,9 +95,11 @@ builder.Services.AddHttpClient(); // For CDN file hash computation
|
||||
builder.Services.AddHealthChecks()
|
||||
.AddCheck<DatabaseHealthCheck>("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<IKeyManager>();
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user