public IpFilterMiddleware( RequestDelegate next, ILogger <IpFilterMiddleware> logger, IEnumerable <IpFilter> ipLists, IpFilterMiddlewareOptions options ) { _ipLists = ipLists; _options = options; _logger = logger; _next = next; }
public static IApplicationBuilder UseIpFilter(this IApplicationBuilder builder, IEnumerable <IpFilter> ipWhiteLists, IpFilterMiddlewareOptions options) { return(builder.UseMiddleware <IpFilterMiddleware>(ipWhiteLists, options)); }