Acho q acabou

This commit is contained in:
GuiNerd
2019-11-30 15:10:33 -03:00
parent cc389221db
commit b98436187f
39 changed files with 924 additions and 1395 deletions

View File

@ -39,6 +39,11 @@ namespace GerenciaProjetos
//services.AddDbContext<GerenciaContext>(options => options.UseMySql(Configuration.GetConnectionString("LaboratConnection")));
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddSession(options => {
options.IdleTimeout = TimeSpan.FromMinutes(10);
options.Cookie.HttpOnly = true;
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@ -51,10 +56,13 @@ namespace GerenciaProjetos
else
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseCookiePolicy();
app.UseSession();
app.UseMvc(routes =>
{