diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-10-20 15:55:04 +1100 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2023-10-20 15:55:04 +1100 |
| commit | c7f2f42b07f5503e99568e288b6f27ae03ea6fa2 (patch) | |
| tree | 4f2368b02b914996a3c8f10b52be7832464e6ec9 /Program.cs | |
| parent | 02670870b2711db0984f492d452a90477c67608a (diff) | |
Fix login bug
Diffstat (limited to 'Program.cs')
| -rw-r--r-- | Program.cs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -9,6 +9,7 @@ namespace HyperBooru; public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); + builder.Services.AddSession(); builder.Services.AddHttpContextAccessor(); builder.Services.AddAuthentication( CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(); @@ -38,6 +39,7 @@ public class Program { using var db = scope.ServiceProvider.GetRequiredService<HBContext>(); db.Database.Migrate(); + app.UseSession(); app.UseHsts(); app.UseHttpsRedirection(); app.UseStaticFiles(); |
