Example #1
0
 public static IApplicationBuilder UseFilterIP(this IApplicationBuilder builder, FilterIPMiddlewareOption option)
 {
     return(builder.UseMiddleware <FilterIPMiddleware>(option));
 }
Example #2
0
 public FilterIPMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, FilterIPMiddlewareOption option)
 {
     _next   = next;
     _logger = loggerFactory.CreateLogger <FilterIPMiddleware>();
     _option = option;
 }