39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
namespace LaaProductionWebCore
|
|
{
|
|
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
public class Startup
|
|
{
|
|
private readonly IConfiguration configuration;
|
|
|
|
public Startup(IConfiguration configuration)
|
|
=> this.configuration = configuration;
|
|
|
|
public void ConfigureServices(IServiceCollection services)
|
|
{
|
|
|
|
|
|
services
|
|
.AddMvc()
|
|
.SetCompatibilityVersion(CompatibilityVersion.Latest);
|
|
}
|
|
|
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
|
{
|
|
app.UseHsts();
|
|
//Can be outcommented when needed
|
|
//app.UseHttpsRedirection();
|
|
app.UseStaticFiles();
|
|
app.UseCookiePolicy();
|
|
app.UseMvc(routes =>
|
|
{
|
|
routes.MapRoute(name: "default", template: "{controller=Home}/{action=Index}/{id?}");
|
|
});
|
|
}
|
|
}
|
|
}
|