修改BUG:设置Cookie.Path="/"防止系统登录后返回前台时还需要登录一次

This commit is contained in:
Argo-MacBookPro 2018-09-14 23:51:27 +08:00
parent 0d78eb9984
commit ae89ac31e3
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ namespace Bootstrap.Admin
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
JsonConvert.DefaultSettings = () => options.SerializerSettings;
}).SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie();
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options => options.Cookie.Path = "/");
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.