RateLimitingConfiguration

class RateLimitingConfiguration

Configuration for the Rate Limiting plugin.

Constructors

Link copied to clipboard
fun RateLimitingConfiguration()

Functions

Link copied to clipboard
fun excludeRequestWhen(body: RateLimitExclusion)

Define selector that excludes given route from the rate limiting completely.

Link copied to clipboard
fun rateLimitHit(action: RateLimitHitAction)

Action that is executed when the rate limit is hit.

Link copied to clipboard
fun registerLimit(limit: Long, window: Duration, extractKey: RateLimitKeyExtraction)

Register a single limit for the rate limiter.

Properties

Link copied to clipboard
var interceptPhase: Hook<suspend (ApplicationCall) -> Unit>

Determines which hook to use to catch the call.

Link copied to clipboard
var purgeHitDuration: Duration

See LinearRateLimiter.purgeHitDuration.

Link copied to clipboard
var purgeHitSize: Int

See LinearRateLimiter.purgeHitSize.

Sources

Link copied to clipboard