[
  {
    "name": "BlockUnsupportedMethods",
    "enabledState": "Enabled",
    "priority": 10,
    "ruleType": "MatchRule",
    "action": "Block",
    "matchConditions": [
      {
        "matchVariable": "RequestMethod",
        "operator": "Equal",
        "negateCondition": true,
        "matchValue": [
          "GET",
          "HEAD",
          "POST",
          "PUT",
          "DELETE",
          "PATCH",
          "OPTIONS"
        ],
        "transforms": []
      }
    ]
  },
  {
    "name": "BlockInvalidExtensionsApiRoute",
    "enabledState": "Enabled",
    "priority": 15,
    "ruleType": "MatchRule",
    "action": "Block",
    "matchConditions": [
      {
        "matchVariable": "RequestUri",
        "operator": "BeginsWith",
        "negateCondition": false,
        "matchValue": [
          "/api/extensions/",
          "https://pleasanter.example.com/api/extensions/",
          "https://pleasanter.example.com:443/api/extensions/"
        ],
        "transforms": [
          "UrlDecode",
          "Lowercase"
        ]
      },
      {
        "matchVariable": "RequestUri",
        "operator": "RegEx",
        "negateCondition": true,
        "matchValue": [
          "^(?:https?://[^/]+)?/api/extensions/(?:create|get|[0-9]+/(?:get|update|delete))/?(?:[?].*)?$"
        ],
        "transforms": [
          "UrlDecode",
          "Lowercase"
        ]
      }
    ]
  },
  {
    "name": "LimitExtremeRequestBurst",
    "enabledState": "Enabled",
    "priority": 200,
    "ruleType": "RateLimitRule",
    "action": "Block",
    "rateLimitDurationInMinutes": 1,
    "rateLimitThreshold": 10000,
    "groupBy": [
      {
        "variableName": "SocketAddr"
      }
    ],
    "matchConditions": [
      {
        "matchVariable": "RequestMethod",
        "operator": "Equal",
        "negateCondition": false,
        "matchValue": [
          "GET",
          "HEAD",
          "POST",
          "PUT",
          "DELETE",
          "PATCH",
          "OPTIONS"
        ],
        "transforms": []
      }
    ]
  }
]
