namespace OpenWaf.Domain.Engine; /// The decision plus everything the response writer and the log need /// to explain it. An engine block always carries its reason and expiry: a ban /// nobody can explain is a ban nobody can defend. public sealed record EdgeDecision( EdgeVerdict Verdict, int StatusCode = 0, string? Location = null, string? Reason = null, string? SourceKey = null, DateTimeOffset? ExpiresAt = null) { public bool IsBlocked => Verdict is EdgeVerdict.BlockOperator or EdgeVerdict.BlockEngine or EdgeVerdict.GeoReject; public static readonly EdgeDecision Pass = new(EdgeVerdict.Pass); }