Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Nov 19, 2024
2 parents a7aea2a + 32d3834 commit b1e715b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Common/OpenShockMiddlewareHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public static IApplicationBuilder UseCommonOpenShockMiddleware(this IApplication

app.UseOpenTelemetryPrometheusScrapingEndpoint(context =>
{
if(context.Request.Path != "/metrics") return false;
var remoteIp = context.Connection.RemoteIpAddress;
return remoteIp != null && metricsAllowedIpNetworks.Any(x => x.Contains(remoteIp));
});
Expand Down

0 comments on commit b1e715b

Please sign in to comment.