30 lines
597 B
C#
30 lines
597 B
C#
using ldap_cesi.Configurations;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
builder.BuildConf();
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
app.UseSwagger();
|
|
app.UseSwaggerUI();
|
|
|
|
app.Use(async (context, next) =>
|
|
{
|
|
if (context.Request.Path == "/")
|
|
{
|
|
context.Response.Redirect("/swagger");
|
|
return;
|
|
}
|
|
await next();
|
|
});
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
app.UseRouting();
|
|
app.UseAuthentication();
|
|
app.UseAuthorization();
|
|
app.MapControllers();
|
|
app.Run();
|