You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Structure is [documented below](#nested_rate_limit_threshold).
460
+
461
+
*`conform_action` -
462
+
(Optional)
463
+
Action to take for requests that are under the configured rate limit threshold.
464
+
Valid option is "allow" only.
465
+
466
+
*`exceed_action` -
467
+
(Optional)
468
+
Action to take for requests that are above the configured rate limit threshold, to deny with a specified HTTP response code.
469
+
Valid options are deny(STATUS), where valid values for STATUS are 403, 404, 429, and 502.
470
+
471
+
*`enforce_on_key` -
472
+
(Optional)
473
+
Determines the key to enforce the rateLimitThreshold on. Possible values are:
474
+
* ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured.
475
+
* IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
476
+
* HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
477
+
* XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
478
+
* HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
479
+
* HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
480
+
* SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
481
+
* REGION_CODE: The country/region from which the request originates.
482
+
* TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
483
+
* USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP.
Rate limit key name applicable only for the following key types:
489
+
HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value.
490
+
HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
491
+
492
+
*`enforce_on_key_configs` -
493
+
(Optional)
494
+
If specified, any combination of values of enforceOnKeyType/enforceOnKeyName is treated as the key on which ratelimit threshold/action is enforced.
495
+
You can specify up to 3 enforceOnKeyConfigs.
496
+
If enforceOnKeyConfigs is specified, enforceOnKey must not be specified.
497
+
Structure is [documented below](#nested_enforce_on_key_configs).
498
+
499
+
*`ban_threshold` -
500
+
(Optional)
501
+
Can only be specified if the action for the rule is "rate_based_ban".
502
+
If specified, the key will be banned for the configured 'banDurationSec' when the number of requests that exceed the 'rateLimitThreshold' also exceed this 'banThreshold'.
503
+
Structure is [documented below](#nested_ban_threshold).
504
+
505
+
*`ban_duration_sec` -
506
+
(Optional)
507
+
Can only be specified if the action for the rule is "rate_based_ban".
508
+
If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
Determines the key to enforce the rateLimitThreshold on. Possible values are:
526
+
* ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKeyConfigs" is not configured.
527
+
* IP: The source IP address of the request is the key. Each IP has this limit enforced separately.
528
+
* HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL.
529
+
* XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP.
530
+
* HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL.
531
+
* HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes.
532
+
* SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session.
533
+
* REGION_CODE: The country/region from which the request originates.
534
+
* TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL.
535
+
* USER_IP: The IP address of the originating client, which is resolved based on "userIpRequestHeaders" configured with the security policy. If there is no "userIpRequestHeaders" configuration or an IP address cannot be resolved from it, the key type defaults to IP.
0 commit comments