AspNetCore.Docs/aspnetcore/migration/proper-to-2x/samples/startup.cs

15 lines
252 B
C#

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseMvc();
}