diff options
| author | Jake Mannens <jake@asger.xyz> | 2026-04-16 02:22:56 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2026-04-16 02:22:56 +1000 |
| commit | ba86ba12732b3290eaa74936950a370966b41ac5 (patch) | |
| tree | fcb1fb3df3a0edc1d0a27a5336c8cadaef593507 /Program.cs | |
| parent | d59e751c5b7c23f0dce2a146b6b8ced80231a0cb (diff) | |
v0.10av0.10a
Diffstat (limited to 'Program.cs')
| -rw-r--r-- | Program.cs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2,6 +2,7 @@ using Microsoft.EntityFrameworkCore; using System.Text.Json.Serialization; using HyperBooru.Services; using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.AspNetCore.DataProtection; namespace HyperBooru; @@ -30,6 +31,13 @@ public class Program { builder.Services.AddHostedService<OcrService>(); builder.Services.AddSingleton<ISourceService, SourceService>(); + // Ensure session keys are stored in a persistent location on all platforms + builder.Services.AddDataProtection() + .PersistKeysToFileSystem(new( + builder.Services.BuildServiceProvider() + .GetRequiredService<IConfigService>() + .KeyPath)); + var app = builder.Build(); // Ensure database is created and it's schema is up to date |
