Пример #1
0
        public static IApplicationBuilder UseRealIp(this IApplicationBuilder builder, Action <FilterOption> configureOption = null)
        {
            var option = new FilterOption();

            configureOption?.Invoke(option);
            return(builder.UseMiddleware <RealIpMiddleware>(option));
        }
Пример #2
0
 public RealIpMiddleware(RequestDelegate next, ILogger <RealIpMiddleware> logger, FilterOption option)
 {
     _next   = next;
     _logger = logger;
     _option = option;
 }