Update an account or zone ruleset rule
Updates an existing rule in an account or zone ruleset.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYAPI Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Accepted Permissions (at least one required)
Mass URL Redirects WriteMagic Firewall WriteL4 DDoS Managed Ruleset WriteTransform Rules WriteSelect Configuration WriteAccount WAF WriteAccount Rulesets WriteLogs WriteParametersExpand Collapse
params RuleEditParams
Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
Query param: Validates the request without persisting changes when set to true. Responses that normally return 200 return result: null; endpoints that normally return 204 continue to return 204.
Body param: The expression defining which traffic will match the rule.
Body param: An object configuring where the rule will be placed.
Body param: An object configuring where the rule will be placed.
Body param: An object configuring the rule’s rate limit behavior.
Body param: An object configuring the rule’s rate limit behavior.
Characteristics of the request on which the rate limit counter will be incremented.
An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.
Period of time in seconds after which the action will be disabled following its first execution.
The threshold of requests per period after which the action will be executed for the first time.
ReturnsExpand Collapse
type RuleEditResponseEnvelopeResult interface{…}A result.
A result.
type RuleEditResponseEnvelopeResult struct{…}A ruleset object.
A ruleset object.
Kind KindThe kind of the ruleset.
The kind of the ruleset.
Phase PhaseThe phase of the ruleset.
The phase of the ruleset.
Rules []RuleEditResponseEnvelopeResultRulesThe list of rules in the ruleset.
The list of rules in the ruleset.
type RuleEditResponseEnvelopeResultRulesChallengeRule struct{…}
The action to perform when the rule matches.
ExposedCredentialCheck RuleEditResponseEnvelopeResultRulesChallengeRuleExposedCredentialCheckOptionalConfiguration for exposed credential checking.
Configuration for exposed credential checking.
Ratelimit RuleEditResponseEnvelopeResultRulesChallengeRuleRatelimitOptionalAn object configuring the rule’s rate limit behavior.
An object configuring the rule’s rate limit behavior.
Characteristics of the request on which the rate limit counter will be incremented.
An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.
Period of time in seconds after which the action will be disabled following its first execution.
The threshold of requests per period after which the action will be executed for the first time.
type RuleEditResponseEnvelopeResultRulesJavaScriptChallengeRule struct{…}
The action to perform when the rule matches.
ExposedCredentialCheck RuleEditResponseEnvelopeResultRulesJavaScriptChallengeRuleExposedCredentialCheckOptionalConfiguration for exposed credential checking.
Configuration for exposed credential checking.
Ratelimit RuleEditResponseEnvelopeResultRulesJavaScriptChallengeRuleRatelimitOptionalAn object configuring the rule’s rate limit behavior.
An object configuring the rule’s rate limit behavior.
Characteristics of the request on which the rate limit counter will be incremented.
An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.
Period of time in seconds after which the action will be disabled following its first execution.
The threshold of requests per period after which the action will be executed for the first time.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRule struct{…}
The action to perform when the rule matches.
ActionParameters RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersOptionalThe parameters configuring the rule’s action.
The parameters configuring the rule’s action.
Immutable RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersImmutableOptionalA cache-control directive configuration.
A cache-control directive configuration.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersImmutableSetDirective struct{…}Set the directive.
Set the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersImmutableSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersImmutableRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersImmutableRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
MaxAge RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMaxAgeOptionalA cache-control directive configuration that accepts a duration value in seconds.
A cache-control directive configuration that accepts a duration value in seconds.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMaxAgeSetDirective struct{…}Set the directive with a duration value in seconds.
Set the directive with a duration value in seconds.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMaxAgeSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMaxAgeRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMaxAgeRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
MustRevalidate RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustRevalidateOptionalA cache-control directive configuration.
A cache-control directive configuration.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustRevalidateSetDirective struct{…}Set the directive.
Set the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustRevalidateSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustRevalidateRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustRevalidateRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
MustUnderstand RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustUnderstandOptionalA cache-control directive configuration.
A cache-control directive configuration.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustUnderstandSetDirective struct{…}Set the directive.
Set the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustUnderstandSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustUnderstandRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersMustUnderstandRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
NoCache RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoCacheOptionalA cache-control directive configuration that accepts optional qualifiers (header names).
A cache-control directive configuration that accepts optional qualifiers (header names).
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoCacheSetDirective struct{…}Set the directive with optional qualifiers.
Set the directive with optional qualifiers.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoCacheSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoCacheRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoCacheRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
NoStore RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoStoreOptionalA cache-control directive configuration.
A cache-control directive configuration.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoStoreSetDirective struct{…}Set the directive.
Set the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoStoreSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoStoreRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoStoreRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
NoTransform RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoTransformOptionalA cache-control directive configuration.
A cache-control directive configuration.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoTransformSetDirective struct{…}Set the directive.
Set the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoTransformSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoTransformRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersNoTransformRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
Private RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPrivateOptionalA cache-control directive configuration that accepts optional qualifiers (header names).
A cache-control directive configuration that accepts optional qualifiers (header names).
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPrivateSetDirective struct{…}Set the directive with optional qualifiers.
Set the directive with optional qualifiers.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPrivateSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPrivateRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPrivateRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
ProxyRevalidate RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersProxyRevalidateOptionalA cache-control directive configuration.
A cache-control directive configuration.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersProxyRevalidateSetDirective struct{…}Set the directive.
Set the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersProxyRevalidateSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersProxyRevalidateRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
Public RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPublicOptionalA cache-control directive configuration.
A cache-control directive configuration.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPublicSetDirective struct{…}Set the directive.
Set the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPublicSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPublicRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersPublicRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
SMaxage RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersSMaxageOptionalA cache-control directive configuration that accepts a duration value in seconds.
A cache-control directive configuration that accepts a duration value in seconds.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersSMaxageSetDirective struct{…}Set the directive with a duration value in seconds.
Set the directive with a duration value in seconds.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersSMaxageSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersSMaxageRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersSMaxageRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
StaleIfError RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleIfErrorOptionalA cache-control directive configuration that accepts a duration value in seconds.
A cache-control directive configuration that accepts a duration value in seconds.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleIfErrorSetDirective struct{…}Set the directive with a duration value in seconds.
Set the directive with a duration value in seconds.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleIfErrorSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleIfErrorRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
StaleWhileRevalidate RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleWhileRevalidateOptionalA cache-control directive configuration that accepts a duration value in seconds.
A cache-control directive configuration that accepts a duration value in seconds.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective struct{…}Set the directive with a duration value in seconds.
Set the directive with a duration value in seconds.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
type RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective struct{…}Remove the directive.
Remove the directive.
Operation RuleEditResponseEnvelopeResultRulesSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirectiveOperationThe operation to perform on the cache-control directive.
The operation to perform on the cache-control directive.
ExposedCredentialCheck RuleEditResponseEnvelopeResultRulesSetCacheControlRuleExposedCredentialCheckOptionalConfiguration for exposed credential checking.
Configuration for exposed credential checking.
Ratelimit RuleEditResponseEnvelopeResultRulesSetCacheControlRuleRatelimitOptionalAn object configuring the rule’s rate limit behavior.
An object configuring the rule’s rate limit behavior.
Characteristics of the request on which the rate limit counter will be incremented.
An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.
Period of time in seconds after which the action will be disabled following its first execution.
The threshold of requests per period after which the action will be executed for the first time.
type RuleEditResponseEnvelopeResultRulesSetCacheTagsRule struct{…}
The action to perform when the rule matches.
ActionParameters RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersOptionalThe parameters configuring the rule’s action.
The parameters configuring the rule’s action.
type RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersAddCacheTagsValues struct{…}Add cache tags using a list of values.
Add cache tags using a list of values.
Operation RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersAddCacheTagsValuesOperationThe operation to perform on the cache tags.
The operation to perform on the cache tags.
type RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersAddCacheTagsExpression struct{…}Add cache tags using an expression.
Add cache tags using an expression.
Operation RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersAddCacheTagsExpressionOperationThe operation to perform on the cache tags.
The operation to perform on the cache tags.
type RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValues struct{…}Remove cache tags using a list of values.
Remove cache tags using a list of values.
Operation RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersRemoveCacheTagsValuesOperationThe operation to perform on the cache tags.
The operation to perform on the cache tags.
type RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpression struct{…}Remove cache tags using an expression.
Remove cache tags using an expression.
Operation RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersRemoveCacheTagsExpressionOperationThe operation to perform on the cache tags.
The operation to perform on the cache tags.
type RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersSetCacheTagsValues struct{…}Set cache tags using a list of values.
Set cache tags using a list of values.
Operation RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersSetCacheTagsValuesOperationThe operation to perform on the cache tags.
The operation to perform on the cache tags.
type RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersSetCacheTagsExpression struct{…}Set cache tags using an expression.
Set cache tags using an expression.
Operation RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleActionParametersSetCacheTagsExpressionOperationThe operation to perform on the cache tags.
The operation to perform on the cache tags.
ExposedCredentialCheck RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleExposedCredentialCheckOptionalConfiguration for exposed credential checking.
Configuration for exposed credential checking.
Ratelimit RuleEditResponseEnvelopeResultRulesSetCacheTagsRuleRatelimitOptionalAn object configuring the rule’s rate limit behavior.
An object configuring the rule’s rate limit behavior.
Characteristics of the request on which the rate limit counter will be incremented.
An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.
Period of time in seconds after which the action will be disabled following its first execution.
The threshold of requests per period after which the action will be executed for the first time.
type RuleEditResponseEnvelopeResultRulesTransformResponseHTMLRule struct{…}
The action to perform when the rule matches.
ActionParameters RuleEditResponseEnvelopeResultRulesTransformResponseHTMLRuleActionParametersOptionalThe parameters configuring the rule’s action.
The parameters configuring the rule’s action.
ExposedCredentialCheck RuleEditResponseEnvelopeResultRulesTransformResponseHTMLRuleExposedCredentialCheckOptionalConfiguration for exposed credential checking.
Configuration for exposed credential checking.
Ratelimit RuleEditResponseEnvelopeResultRulesTransformResponseHTMLRuleRatelimitOptionalAn object configuring the rule’s rate limit behavior.
An object configuring the rule’s rate limit behavior.
Characteristics of the request on which the rate limit counter will be incremented.
An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.
Period of time in seconds after which the action will be disabled following its first execution.
The threshold of requests per period after which the action will be executed for the first time.
Update an account or zone ruleset rule
package main
import (
"context"
"fmt"
"github.com/cloudflare/cloudflare-go"
"github.com/cloudflare/cloudflare-go/option"
"github.com/cloudflare/cloudflare-go/rulesets"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
response, err := client.Rulesets.Rules.Edit(
context.TODO(),
"2f2feab2026849078ba485f918791bdc",
"3a03d665bac047339bb530ecb439a90d",
rulesets.RuleEditParams{
Body: rulesets.RuleEditParamsBodyBlockRule(rulesets.RuleEditParamsBodyBlockRule{
BlockRuleParam: rulesets.BlockRuleParam{
},
}),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
}
{
"errors": [
{
"message": "something bad happened",
"code": 10000,
"source": {
"pointer": "/rules/0/action"
}
}
],
"messages": [
{
"message": "something bad happened",
"code": 10000,
"source": {
"pointer": "/rules/0/action"
}
}
],
"result": {
"id": "2f2feab2026849078ba485f918791bdc",
"kind": "root",
"last_updated": "2000-01-01T00:00:00Z",
"name": "My ruleset",
"phase": "http_request_firewall_custom",
"rules": [
{
"last_updated": "2000-01-01T00:00:00Z",
"version": "1",
"id": "id",
"action": "action",
"action_parameters": {
"response": {
"content": "{\n \"success\": false,\n \"error\": \"you have been blocked\"\n}",
"content_type": "application/json",
"status_code": 400
}
},
"categories": [
"directory-traversal"
],
"description": "Block the request.",
"enabled": true,
"exposed_credential_check": {
"password_expression": "url_decode(http.request.body.form[\\\"password\\\"][0])",
"username_expression": "url_decode(http.request.body.form[\\\"username\\\"][0])"
},
"expression": "expression",
"logging": {
"enabled": true
},
"ratelimit": {
"characteristics": [
"cf.colo.id"
],
"period": 60,
"counting_expression": "http.request.body.raw eq \"abcd\"",
"mitigation_timeout": 600,
"requests_per_period": 1000,
"requests_to_origin": true,
"score_per_period": 400,
"score_response_header_name": "my-score"
},
"ref": "ref"
}
],
"version": "1",
"description": "A description for my ruleset."
},
"success": true
}Returns Examples
{
"errors": [
{
"message": "something bad happened",
"code": 10000,
"source": {
"pointer": "/rules/0/action"
}
}
],
"messages": [
{
"message": "something bad happened",
"code": 10000,
"source": {
"pointer": "/rules/0/action"
}
}
],
"result": {
"id": "2f2feab2026849078ba485f918791bdc",
"kind": "root",
"last_updated": "2000-01-01T00:00:00Z",
"name": "My ruleset",
"phase": "http_request_firewall_custom",
"rules": [
{
"last_updated": "2000-01-01T00:00:00Z",
"version": "1",
"id": "id",
"action": "action",
"action_parameters": {
"response": {
"content": "{\n \"success\": false,\n \"error\": \"you have been blocked\"\n}",
"content_type": "application/json",
"status_code": 400
}
},
"categories": [
"directory-traversal"
],
"description": "Block the request.",
"enabled": true,
"exposed_credential_check": {
"password_expression": "url_decode(http.request.body.form[\\\"password\\\"][0])",
"username_expression": "url_decode(http.request.body.form[\\\"username\\\"][0])"
},
"expression": "expression",
"logging": {
"enabled": true
},
"ratelimit": {
"characteristics": [
"cf.colo.id"
],
"period": 60,
"counting_expression": "http.request.body.raw eq \"abcd\"",
"mitigation_timeout": 600,
"requests_per_period": 1000,
"requests_to_origin": true,
"score_per_period": 400,
"score_response_header_name": "my-score"
},
"ref": "ref"
}
],
"version": "1",
"description": "A description for my ruleset."
},
"success": true
}