Skip to content

Commit

Permalink
Use foreach instead of linq
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcoltheart committed Dec 6, 2023
1 parent 188d59d commit 015ad3b
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ private static bool AcceptsOpenMetrics(HttpRequest request)
return false;
}

return acceptHeader.Any(PrometheusHeadersParser.AcceptsOpenMetrics);
foreach (var header in acceptHeader)
{
if (PrometheusHeadersParser.AcceptsOpenMetrics(header))
{
return true;
}
}

return false;
}
}

0 comments on commit 015ad3b

Please sign in to comment.