Initial commit
This commit is contained in:
32
GerstITS.Examples.Api/Startup.cs
Normal file
32
GerstITS.Examples.Api/Startup.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using GerstITS.Web.Api;
|
||||
using GerstITS.Web.Api.Builder;
|
||||
using GerstITS.Web.Api.Hosting;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace GerstITS.Examples.Api
|
||||
{
|
||||
public class Startup : BootstrapperStartupBase
|
||||
{
|
||||
#region Methods
|
||||
|
||||
protected override void ConfigureApplication(IApplicationBuilder applicationBuilder, IWebHostEnvironment webHostEnvironment)
|
||||
{
|
||||
if (webHostEnvironment.IsDevelopment())
|
||||
applicationBuilder.UseDeveloperExceptionPage()
|
||||
.UseSwagger();
|
||||
else
|
||||
applicationBuilder.UseHsts();
|
||||
|
||||
applicationBuilder.UseHttpsRedirection()
|
||||
.UseAuthentication()
|
||||
.UseAuthorization()
|
||||
.UseRouting()
|
||||
.UseEndpoints(endpoints => endpoints.MapControllers())
|
||||
.UseRewriteUnknownPathsToIndexSite(ApplicationEnvironment.WebApi.BaseUrl)
|
||||
.UseStaticFiles();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user