summaryrefslogtreecommitdiff
path: root/Program.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-10-20 15:55:04 +1100
committerJake Mannens <jake@asger.xyz>2023-10-20 15:55:04 +1100
commitc7f2f42b07f5503e99568e288b6f27ae03ea6fa2 (patch)
tree4f2368b02b914996a3c8f10b52be7832464e6ec9 /Program.cs
parent02670870b2711db0984f492d452a90477c67608a (diff)
Fix login bug
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Program.cs b/Program.cs
index 68c7af3..90fcbcb 100644
--- a/Program.cs
+++ b/Program.cs
@@ -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();