using OpenWaf.Domain.Policy; namespace OpenWaf.Domain.Engine; /// /// Maps an upstream status code to a . /// Q2 settled: the refusal range is inclusive at 400, so a malformed-body /// probe counts. Q3 settled: the 5xx range is classified separately and the /// decision point never bans on it. /// public static class ResponseClassifier { public static ResponseClass Classify(int statusCode, EdgePolicy policy) { if (policy.RefusalRange.Contains(statusCode)) return ResponseClass.Refusal; if (policy.ServerErrorRange.Contains(statusCode)) return ResponseClass.ServerError; return ResponseClass.Neutral; } }