C# Класс Bit.Api.Middleware.CustomIpRateLimitMiddleware

Наследование: IpRateLimitMiddleware
Показать файл Открыть проект

Открытые методы

Метод Описание
CustomIpRateLimitMiddleware ( IMemoryCache memoryCache, IBlockIpService blockIpService, RequestDelegate next, IOptions options, IRateLimitCounterStore counterStore, IIpPolicyStore policyStore, ILogger logger, IIpAddressParser ipParser = null ) : System.Threading.Tasks
LogBlockedRequest ( HttpContext httpContext, ClientRequestIdentity identity, RateLimitCounter counter, RateLimitRule rule ) : void
ReturnQuotaExceededResponse ( HttpContext httpContext, RateLimitRule rule, string retryAfter ) : System.Threading.Tasks.Task

Описание методов

CustomIpRateLimitMiddleware() публичный Метод

public CustomIpRateLimitMiddleware ( IMemoryCache memoryCache, IBlockIpService blockIpService, RequestDelegate next, IOptions options, IRateLimitCounterStore counterStore, IIpPolicyStore policyStore, ILogger logger, IIpAddressParser ipParser = null ) : System.Threading.Tasks
memoryCache IMemoryCache
blockIpService IBlockIpService
next RequestDelegate
options IOptions
counterStore IRateLimitCounterStore
policyStore IIpPolicyStore
logger ILogger
ipParser IIpAddressParser
Результат System.Threading.Tasks

LogBlockedRequest() публичный Метод

public LogBlockedRequest ( HttpContext httpContext, ClientRequestIdentity identity, RateLimitCounter counter, RateLimitRule rule ) : void
httpContext HttpContext
identity ClientRequestIdentity
counter RateLimitCounter
rule RateLimitRule
Результат void

ReturnQuotaExceededResponse() публичный Метод

public ReturnQuotaExceededResponse ( HttpContext httpContext, RateLimitRule rule, string retryAfter ) : System.Threading.Tasks.Task
httpContext HttpContext
rule RateLimitRule
retryAfter string
Результат System.Threading.Tasks.Task