using System.Net; var builder = WebApplication.CreateBuilder(args); // Add services to the container. // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi builder.Services.AddOpenApi(); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.MapOpenApi(); } //my reverse proxy handles HTTPS //app.UseHttpsRedirection(); app.MapGet("/{name}", async (string name) => { string? url = await Redirect.HandleRedirectAsync(name); if(url is not null) return Results.Redirect(url,false,false); else return Results.Text( """