Na most működig SWAGGER és 5000 porton publishban is !
This commit is contained in:
@@ -11,18 +11,13 @@ using WorkFlowCheck.BL.Infra;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.WriteTo.Console() // Logok írása a konzolra
|
||||
.WriteTo.File("logs/WorkFlowCheck.log", rollingInterval: RollingInterval.Day) // Logok fájlba
|
||||
.ReadFrom.Configuration(builder.Configuration)
|
||||
.CreateLogger();
|
||||
|
||||
//builder.WebHost.ConfigureKestrel(options =>
|
||||
//{
|
||||
// options.ListenAnyIP(5069, listenOptions =>
|
||||
// {
|
||||
// listenOptions.UseHttps(Path.Combine(AppContext.BaseDirectory, "Certs", "SwaggerCert.pfx"), "Noispot135!Xy()zz654321");
|
||||
// });
|
||||
//});
|
||||
|
||||
builder.Services.AddAutoMapper(typeof(MapperProfile));
|
||||
|
||||
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
|
||||
@@ -78,7 +73,10 @@ builder.Services.AddControllers()
|
||||
options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
|
||||
});
|
||||
|
||||
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Swagger middleware
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
@@ -91,11 +89,10 @@ if (app.Environment.IsDevelopment())
|
||||
|
||||
// Routing és endpointok
|
||||
app.UseHttpsRedirection();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.UseRouting();
|
||||
app.UseMiddleware<ApiKeyMiddleware>();
|
||||
app.MapControllers();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.Run();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user