public static class JsChallenge.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
JsChallenge.Builder |
action(JsChallenge.Action action)
The action to take against requests from detected bots.
|
JsChallenge.Builder |
actionExpirationInSeconds(Integer actionExpirationInSeconds)
The number of seconds between challenges from the same IP address.
|
JsChallenge.Builder |
areRedirectsChallenged(Boolean areRedirectsChallenged)
When enabled, redirect responses from the origin will also be challenged.
|
JsChallenge |
build() |
JsChallenge.Builder |
challengeSettings(BlockChallengeSettings challengeSettings) |
JsChallenge.Builder |
copy(JsChallenge model) |
JsChallenge.Builder |
criteria(List<AccessRuleCriteria> criteria)
When defined, the JavaScript Challenge would be applied only for the requests that
matched all the listed conditions.
|
JsChallenge.Builder |
failureThreshold(Integer failureThreshold)
The number of failed requests before taking action.
|
JsChallenge.Builder |
isEnabled(Boolean isEnabled)
Enables or disables the JavaScript challenge Web Application Firewall feature.
|
JsChallenge.Builder |
isNatEnabled(Boolean isNatEnabled)
When enabled, the user is identified not only by the IP address but also by an unique
additional hash, which prevents blocking visitors with shared IP addresses.
|
JsChallenge.Builder |
setHttpHeader(Header setHttpHeader)
Adds an additional HTTP header to requests that fail the challenge before being passed to
the origin.
|
public JsChallenge.Builder isEnabled(Boolean isEnabled)
Enables or disables the JavaScript challenge Web Application Firewall feature.
isEnabled
- the value to setpublic JsChallenge.Builder action(JsChallenge.Action action)
The action to take against requests from detected bots. If unspecified, defaults to
DETECT
.
action
- the value to setpublic JsChallenge.Builder failureThreshold(Integer failureThreshold)
The number of failed requests before taking action. If unspecified, defaults to 10
.
failureThreshold
- the value to setpublic JsChallenge.Builder actionExpirationInSeconds(Integer actionExpirationInSeconds)
The number of seconds between challenges from the same IP address. If unspecified,
defaults to 60
.
actionExpirationInSeconds
- the value to setpublic JsChallenge.Builder setHttpHeader(Header setHttpHeader)
Adds an additional HTTP header to requests that fail the challenge before being passed to
the origin. Only applicable when the action
is set to DETECT
.
setHttpHeader
- the value to setpublic JsChallenge.Builder challengeSettings(BlockChallengeSettings challengeSettings)
public JsChallenge.Builder areRedirectsChallenged(Boolean areRedirectsChallenged)
When enabled, redirect responses from the origin will also be challenged. This will change HTTP 301/302 responses from origin to HTTP 200 with an HTML body containing JavaScript page redirection.
areRedirectsChallenged
- the value to setpublic JsChallenge.Builder criteria(List<AccessRuleCriteria> criteria)
When defined, the JavaScript Challenge would be applied only for the requests that matched all the listed conditions.
criteria
- the value to setpublic JsChallenge.Builder isNatEnabled(Boolean isNatEnabled)
When enabled, the user is identified not only by the IP address but also by an unique additional hash, which prevents blocking visitors with shared IP addresses.
isNatEnabled
- the value to setpublic JsChallenge build()
public JsChallenge.Builder copy(JsChallenge model)
Copyright © 2016–2024. All rights reserved.