Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 685047f

Browse files
Configure login page
1 parent 9c27c2b commit 685047f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

‎Webgentle.BookStore/Webgentle.BookStore/Startup.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ public void ConfigureServices(IServiceCollection services)
4747
options.Password.RequireUppercase = false;
4848
});
4949

50+
services.ConfigureApplicationCookie(config =>
51+
{
52+
config.LoginPath = _configuration["Application:LoginPath"];
53+
});
54+
5055
services.AddControllersWithViews();
5156
#if DEBUG
5257
services.AddRazorPages().AddRazorRuntimeCompilation();
@@ -62,8 +67,8 @@ public void ConfigureServices(IServiceCollection services)
6267
services.AddSingleton<IMessageRepository, MessageRepository>();
6368
services.AddScoped<IAccountRepository, AccountRepository>();
6469

65-
services.Configure<NewBookAlertConfig>("InternalBook",_configuration.GetSection("NewBookAlert"));
66-
services.Configure<NewBookAlertConfig>("ThirdPartyBook",_configuration.GetSection("ThirdPartyBook"));
70+
services.Configure<NewBookAlertConfig>("InternalBook",_configuration.GetSection("NewBookAlert"));
71+
services.Configure<NewBookAlertConfig>("ThirdPartyBook",_configuration.GetSection("ThirdPartyBook"));
6772
}
6873

6974
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

‎Webgentle.BookStore/Webgentle.BookStore/appsettings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
},
1212
"AllowedHosts": "*",
1313
"AppName": "Book store App",
14+
"Application": {
15+
"LoginPath": "/login"
16+
},
1417

1518
"NewBookAlert": {
1619
"DisplayNewBookAlert": false,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /