using System.Net;
namespace w4c_workflows.Services.Security;
///
/// Resolves a host name to the addresses a request could actually reach.
/// Abstracted so the egress guard can be unit-tested without touching DNS.
///
public interface IHostAddressResolver
{
Task> ResolveAsync(string host, CancellationToken ct);
}
/// Production resolver backed by .
public sealed class DnsHostAddressResolver : IHostAddressResolver
{
public async Task> ResolveAsync(string host, CancellationToken ct)
=> await Dns.GetHostAddressesAsync(host, ct);
}