Rate Limits
List rate limits
Get a rate limit
Create a rate limit
Update a rate limit
Delete a rate limit
ModelsExpand Collapse
type RateLimit struct{…}
Action RateLimitActionoptionalThe action to perform when the threshold of matched traffic within the configured period is exceeded.
The action to perform when the threshold of matched traffic within the configured period is exceeded.
Response RateLimitActionResponseoptionalA custom content type and reponse to return when the threshold is exceeded. The custom response configured in this object will override the custom error for the zone. This object is optional.
Notes: If you omit this object, Cloudflare will use the default HTML error page. If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge pages and you should not provide the "response" object.
A custom content type and reponse to return when the threshold is exceeded. The custom response configured in this object will override the custom error for the zone. This object is optional. Notes: If you omit this object, Cloudflare will use the default HTML error page. If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge pages and you should not provide the "response" object.
The time in seconds during which Cloudflare will perform the mitigation action. Must be an integer value greater than or equal to the period. Notes: If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone's Challenge Passage time and you should not provide this value.
Bypass []RateLimitBypassoptionalCriteria specifying when the current rate limit should be bypassed. You can specify that the rate limit should not apply to one or more URLs.
Criteria specifying when the current rate limit should be bypassed. You can specify that the rate limit should not apply to one or more URLs.
An informative summary of the rule. This value is sanitized and any tags will be removed.
Match RateLimitMatchoptionalDetermines which traffic the rate limit counts towards the threshold.
Determines which traffic the rate limit counts towards the threshold.
Headers []RateLimitMatchHeaderoptional
Request RateLimitMatchRequestoptional
Methods []RateLimitMatchRequestMethodoptionalThe HTTP methods to match. You can specify a subset (for example, ['POST','PUT']) or all methods (['_ALL_']). This field is optional when creating a rate limit.
The HTTP methods to match. You can specify a subset (for example, ['POST','PUT']) or all methods (['_ALL_']). This field is optional when creating a rate limit.
The HTTP schemes to match. You can specify one scheme (['HTTPS']), both schemes (['HTTP','HTTPS']), or all schemes (['_ALL_']). This field is optional.
The URL pattern to match, composed of a host and a path such as example.org/path*. Normalization is applied before the pattern is matched. * wildcards are expanded to match applicable traffic. Query strings are not matched. Set the value to * to match all traffic to your zone.
Response RateLimitMatchResponseoptional
When true, only the uncached traffic served from your origin servers will count towards rate limiting. In this case, any cached traffic served by Cloudflare will not count towards rate limiting. This field is optional. Notes: This field is deprecated. Instead, use response headers and set "origin_traffic" to "false" to avoid legacy behaviour interacting with the "response_headers" property.