using System.Net; var builder = WebApplication.CreateBuilder(args); // Add services to the container. // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); builder.WebHost.ConfigureKestrel(options => { options.AddServerHeader = false; options.Listen(IPAddress.Any, 8085); //options.Listen(IPAddress.Any, 4431, listenOptions => //{ // listenOptions.UseHttps("/etc/letsencrypt/live/x/letsencrypt.pfx", ""); //}); }); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); } //app.UseHttpsRedirection(); app.MapGet("/", async (HttpContext context) => { await context.Response.WriteAsync("Hello, alex-api.onlystefan.com"); }); app.MapGet("/test", async (HttpContext context) => { await context.Response.WriteAsync("test"); }); app.Run();