From 90a71d7849cb424db84d6e1bb8ef6eb68d6d8564 Mon Sep 17 00:00:00 2001 From: min Date: Sun, 17 Feb 2019 20:51:47 +0900 Subject: [PATCH] =?utf8?q?=EC=B6=A9=EB=8F=8C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ZipProject/Startup.cs | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/ZipProject/Startup.cs b/ZipProject/Startup.cs index f9327b8..889b728 100644 --- a/ZipProject/Startup.cs +++ b/ZipProject/Startup.cs @@ -1,3 +1,4 @@ +<<<<<<< HEAD using System; using System.Collections.Generic; using System.Linq; @@ -62,3 +63,69 @@ namespace ZipProject } } } +======= +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace ZipProject +{ + 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; + }); + 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?}"); + }); + } + } +} +>>>>>>> 4fb88bf867ddbc39d58fdd0ea3b54669e05eee14 -- 2.43.0