From 64b6b996a4df72110bc6a0ff19e9b8377985d710 Mon Sep 17 00:00:00 2001 From: min Date: Sun, 17 Feb 2019 20:48:17 +0900 Subject: [PATCH] re pull --- ZipProject/Startup.cs | 94 +++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/ZipProject/Startup.cs b/ZipProject/Startup.cs index a9547a2..f9327b8 100644 --- a/ZipProject/Startup.cs +++ b/ZipProject/Startup.cs @@ -11,54 +11,54 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; namespace ZipProject -{ - public class Startup +{ + public class Startup { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - services.Configure(options => - { - // This lambda determines whether user consent for non-essential cookies is needed for a given request. - options.CheckConsentNeeded = context => false; - options.MinimumSameSitePolicy = SameSiteMode.None; - }); + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.Configure(options => + { + // This lambda determines whether user consent for non-essential cookies is needed for a given request. + options.CheckConsentNeeded = context => false; + options.MinimumSameSitePolicy = SameSiteMode.None; + }); services.AddSession(s => s.IdleTimeout = TimeSpan.FromMinutes(5)); - services.AddHttpContextAccessor(); - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseExceptionHandler("/Home/Error"); - app.UseHsts(); - } - - //app.UseHttpsRedirection(); - app.UseStaticFiles(); - app.UseCookiePolicy(); - app.UseSession(); - - app.UseMvc(routes => - { - routes.MapRoute( - name: "default", - template: "{controller=WebZip}/{action=Index}/{id?}"); - }); - } + services.AddHttpContextAccessor(); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + app.UseExceptionHandler("/Home/Error"); + app.UseHsts(); + } + + //app.UseHttpsRedirection(); + app.UseStaticFiles(); + app.UseCookiePolicy(); + app.UseSession(); + + app.UseMvc(routes => + { + routes.MapRoute( + name: "default", + template: "{controller=WebZip}/{action=Index}/{id?}"); + }); + } } } -- 2.43.0