RulesetRuleRatelimit

data class RulesetRuleRatelimit(val characteristics: List<String>, val countingExpression: String? = null, val mitigationTimeout: Int? = null, val period: Int, val requestsPerPeriod: Int? = null, val requestsToOrigin: Boolean? = null, val scorePerPeriod: Int? = null, val scoreResponseHeaderName: String? = null)

Constructors

Link copied to clipboard
constructor(characteristics: List<String>, countingExpression: String? = null, mitigationTimeout: Int? = null, period: Int, requestsPerPeriod: Int? = null, requestsToOrigin: Boolean? = null, scorePerPeriod: Int? = null, scoreResponseHeaderName: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Characteristics of the request on which the ratelimiter counter will be incremented.

Link copied to clipboard

Defines when the ratelimit counter should be incremented. It is optional and defaults to the same as the rule's expression.

Link copied to clipboard
val mitigationTimeout: Int? = null

Period of time in seconds after which the action will be disabled following its first execution.

Link copied to clipboard
val period: Int

Period in seconds over which the counter is being incremented. Available values: 10, 60, 600, 3600.

Link copied to clipboard
val requestsPerPeriod: Int? = null

The threshold of requests per period after which the action will be executed for the first time.

Link copied to clipboard

Defines if ratelimit counting is only done when an origin is reached.

Link copied to clipboard
val scorePerPeriod: Int? = null

The score threshold per period for which the action will be executed the first time.

Link copied to clipboard

The response header name provided by the origin which should contain the score to increment ratelimit counter on.