namespace AVSCartonShipmentVerifier.Hosting; internal static class KestrelConfiguration { public static bool HasHttpsEndpoint(IConfiguration configuration) { var endpoints = configuration.GetSection("Kestrel:Endpoints").GetChildren(); foreach (var endpoint in endpoints) { var url = endpoint["Url"]; if (!string.IsNullOrWhiteSpace(url) && url.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) { return true; } } return false; } }