AWS WAF:您对只需要一个值的字段没有使用或使用多个值

问题描述 投票:0回答:1

问题

无法为 AWS WAF 实施 AWS 定义的自定义 JSON 规则。 我正在关注文档,但我不明白我如何超出了这些值。规则 #2 我能够应用,但我也需要能够应用计数规则。

错误

Error reason: You have used none or multiple values for a field that requires exactly one value., field: RULE, parameter: Rule
{
  "Name": "AWSBotControl-SignalOverride",
  "Priority": 5,
  "Statement": {
    "ManagedRuleGroupStatement": {
      "VendorName": "AWS",
      "Name": "AWSManagedRulesBotControlRuleSet",
      "RuleActionOverrides": [
        {
          "Action": "Count",
          "OverrideAction": { "Count": {} }, // Use this if specific configuration for count is needed.
          "Name": "SignalNonBrowserUserAgent"
        }
      ]
    }
  },
  "VisibilityConfig": {
    "SampledRequestsEnabled": true,
    "CloudWatchMetricsEnabled": true,
    "MetricName": "AWSBotControl-SignalOverride"
  }
}

json amazon-web-services bots amazon-waf
1个回答
0
投票

这似乎对我有用。它是 WebACL BotControl 规则底部的固有可选设置。

将此与限制规则结合使用,您可以防止非浏览器代理被默认阻止。

© www.soinside.com 2019 - 2024. All rights reserved.