From f1f6af588ea5d6068e824303607e81cdd80cbd93 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 20 Aug 2021 21:48:17 +0200 Subject: Update packages, add AppCookie --- src/Startup.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Startup.cs') diff --git a/src/Startup.cs b/src/Startup.cs index a3a7009..8ad5b07 100644 --- a/src/Startup.cs +++ b/src/Startup.cs @@ -30,7 +30,7 @@ namespace IOL.WebApi.Template services.AddDataProtection() .PersistKeysToFileSystem(new DirectoryInfo(AppPaths.DataProtectionKeys.HostPath)); - services.Configure(AppJsonSettings.Value); + services.Configure(AppJsonSettings.Default); services.AddDbContext(options => { options.UseNpgsql("Server={DB_HOST};Port={DB_PORT};Database={DB_NAME};User Id={DB_USER};Password={DB_PASSWORD}".UnicornFormatWithEnvironment(Configuration), @@ -45,14 +45,14 @@ namespace IOL.WebApi.Template services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) .AddCookie(options => { - options.Cookie.Name = ""; + options.Cookie.Name = AppCookies.Session.Name; options.Cookie.SameSite = SameSiteMode.Strict; options.Cookie.HttpOnly = true; options.Cookie.SecurePolicy = CookieSecurePolicy.SameAsRequest; }); services.AddControllers() - .AddJsonOptions(AppJsonSettings.Value); + .AddJsonOptions(AppJsonSettings.Default); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. -- cgit v1.3