Fucking rediss......
This commit is contained in:
+11
-1
@@ -95,9 +95,11 @@ builder.Services.AddHttpClient(); // For CDN file hash computation
|
|||||||
builder.Services.AddHealthChecks()
|
builder.Services.AddHealthChecks()
|
||||||
.AddCheck<DatabaseHealthCheck>("mysql", tags: new[] { "ready" });
|
.AddCheck<DatabaseHealthCheck>("mysql", tags: new[] { "ready" });
|
||||||
|
|
||||||
|
var dpDb = redisMux.GetDatabase(2);
|
||||||
|
|
||||||
builder.Services.AddDataProtection()
|
builder.Services.AddDataProtection()
|
||||||
.SetApplicationName("Void")
|
.SetApplicationName("Void")
|
||||||
.PersistKeysToStackExchangeRedis(() => redisMux.GetDatabase(), "Void:DataProtectionKeys");
|
.PersistKeysToStackExchangeRedis(() => dpDb, "Void:DataProtectionKeys");
|
||||||
|
|
||||||
//var app = builder.Build();
|
//var app = builder.Build();
|
||||||
|
|
||||||
@@ -243,5 +245,13 @@ app.Lifetime.ApplicationStopping.Register(() =>
|
|||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.MapRazorPages();
|
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");
|
app.Logger.LogInformation("Admin panel available at /admin");
|
||||||
await app.RunAsync();
|
await app.RunAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user