Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AspNetCoreRateLimit/Core/IRateLimitProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public interface IRateLimitProcessor
Task<IEnumerable<RateLimitRule>> GetMatchingRulesAsync(ClientRequestIdentity identity, CancellationToken cancellationToken = default);
RateLimitHeaders GetRateLimitHeaders(RateLimitCounter? counter, RateLimitRule rule, CancellationToken cancellationToken = default);
Task<RateLimitCounter> ProcessRequestAsync(ClientRequestIdentity requestIdentity, RateLimitRule rule, CancellationToken cancellationToken = default);
bool IsWhitelisted(ClientRequestIdentity requestIdentity);
bool IsOnAllowedList(ClientRequestIdentity requestIdentity);
}
}
2 changes: 1 addition & 1 deletion src/AspNetCoreRateLimit/Core/RateLimitProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected RateLimitProcessor(RateLimitOptions options)
}


public virtual bool IsWhitelisted(ClientRequestIdentity requestIdentity)
public virtual bool IsOnAllowedList(ClientRequestIdentity requestIdentity)
{
if (_options.ClientWhitelist != null && _options.ClientWhitelist.Contains(requestIdentity.ClientId))
{
Expand Down
4 changes: 2 additions & 2 deletions src/AspNetCoreRateLimit/Middleware/RateLimitMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public async Task Invoke(HttpContext context)
// compute identity from request
var identity = await ResolveIdentityAsync(context);

// check white list
if (_processor.IsWhitelisted(identity))
// check allowed list
if (_processor.IsOnAllowedList(identity))
{
await _next.Invoke(context);
return;
Expand Down