diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2021-08-20 21:48:17 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2021-08-20 21:48:17 +0200 |
| commit | f1f6af588ea5d6068e824303607e81cdd80cbd93 (patch) | |
| tree | e901039571c88ebd1b077ef9aecce88ff7a0f5a0 /src/Startup.cs | |
| parent | 4322330745d18bb28f7deee1a54ae3c748645d92 (diff) | |
| download | dotnet-webapi-template-f1f6af588ea5d6068e824303607e81cdd80cbd93.tar.xz dotnet-webapi-template-f1f6af588ea5d6068e824303607e81cdd80cbd93.zip | |
Update packages, add AppCookie
Diffstat (limited to 'src/Startup.cs')
| -rw-r--r-- | src/Startup.cs | 6 |
1 files changed, 3 insertions, 3 deletions
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<AppDbContext>(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. |
