public Task Invoke(HttpContext context, HealthEndpointCore endpoint) { _endpoint = endpoint; if (_endpoint.ShouldInvoke(_mgmtOptions)) { return(HandleHealthRequestAsync(context)); } return(Task.CompletedTask); }
public async Task Invoke(HttpContext context, HealthEndpointCore endpoint) { _endpoint = endpoint; if (RequestVerbAndPathMatch(context.Request.Method, context.Request.Path.Value)) { await HandleHealthRequestAsync(context).ConfigureAwait(false); } else { await _next(context).ConfigureAwait(false); } }