Skip to content

Commit

Permalink
Merge pull request cloudflare#808 from zakcutner/ratelimit-counting-e…
Browse files Browse the repository at this point in the history
…xpression

Change ratelimit `mitigation_expression` to `counting_expression`
  • Loading branch information
jacobbednarz authored Feb 20, 2022
2 parents ece6c43 + 27afcca commit c92a2be
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions rulesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,11 @@ type RulesetRule struct {

// RulesetRuleRateLimit contains the structure of a HTTP rate limit Ruleset Rule.
type RulesetRuleRateLimit struct {
Characteristics []string `json:"characteristics,omitempty"`
RequestsPerPeriod int `json:"requests_per_period,omitempty"`
Period int `json:"period,omitempty"`
MitigationTimeout int `json:"mitigation_timeout,omitempty"`

// Should always be sent as "" will trigger the service to use the Ruleset
// expression instead.
MitigationExpression string `json:"mitigation_expression"`
Characteristics []string `json:"characteristics,omitempty"`
RequestsPerPeriod int `json:"requests_per_period,omitempty"`
Period int `json:"period,omitempty"`
MitigationTimeout int `json:"mitigation_timeout,omitempty"`
CountingExpression string `json:"counting_expression,omitempty"`
}

// RulesetRuleExposedCredentialCheck contains the structure of an exposed
Expand Down

0 comments on commit c92a2be

Please sign in to comment.