Ejemplo n.º 1
0
 public CustomIpRateLimitMiddleware(
     IMemoryCache memoryCache,
     IBlockIpService blockIpService,
     RequestDelegate next,
     IOptions<IpRateLimitOptions> options,
     IRateLimitCounterStore counterStore,
     IIpPolicyStore policyStore,
     ILogger<IpRateLimitMiddleware> logger,
     IIpAddressParser ipParser = null)
     : base(next, options, counterStore, policyStore, logger, ipParser)
 {
     _memoryCache = memoryCache;
     _blockIpService = blockIpService;
     _options = options.Value;
     _logger = logger;
 }
Ejemplo n.º 2
0
 public CustomIpRateLimitMiddleware(
     IMemoryCache memoryCache,
     IBlockIpService blockIpService,
     RequestDelegate next,
     IOptions <IpRateLimitOptions> options,
     IRateLimitCounterStore counterStore,
     IIpPolicyStore policyStore,
     ILogger <IpRateLimitMiddleware> logger,
     IIpAddressParser ipParser = null)
     : base(next, options, counterStore, policyStore, logger, ipParser)
 {
     _memoryCache    = memoryCache;
     _blockIpService = blockIpService;
     _options        = options.Value;
     _logger         = logger;
 }
Ejemplo n.º 3
0
 public CustomIpRateLimitMiddleware(
     IDistributedCache distributedCache,
     IBlockIpService blockIpService,
     RequestDelegate next,
     IProcessingStrategy processingStrategy,
     IRateLimitConfiguration rateLimitConfiguration,
     IOptions <IpRateLimitOptions> options,
     IIpPolicyStore policyStore,
     ILogger <CustomIpRateLimitMiddleware> logger)
     : base(next, processingStrategy, options, policyStore, rateLimitConfiguration, logger)
 {
     _distributedCache = distributedCache;
     _blockIpService   = blockIpService;
     _options          = options.Value;
     _logger           = logger;
 }