Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace JsChallenge

The JavaScript challenge settings. JavaScript Challenge is the function to filter abnormal or malicious bots and allow access to real clients.

Properties

Optional action

action: Action

The action to take against requests from detected bots. If unspecified, defaults to {@code DETECT}.

Optional actionExpirationInSeconds

actionExpirationInSeconds: undefined | number

The number of seconds between challenges from the same IP address. If unspecified, defaults to {@code 60}. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

Optional areRedirectsChallenged

areRedirectsChallenged: undefined | false | true

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.

Optional challengeSettings

challengeSettings: model.BlockChallengeSettings

Optional criteria

When defined, the JavaScript Challenge would be applied only for the requests that matched all the listed conditions.

Optional failureThreshold

failureThreshold: undefined | number

The number of failed requests before taking action. If unspecified, defaults to {@code 10}. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

isEnabled

isEnabled: boolean

Enables or disables the JavaScript challenge Web Application Firewall feature.

Optional isNatEnabled

isNatEnabled: undefined | false | true

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.

Optional setHttpHeader

setHttpHeader: model.Header

Adds an additional HTTP header to requests that fail the challenge before being passed to the origin. Only applicable when the {@code action} is set to {@code DETECT}.

Functions

getDeserializedJsonObj

getJsonObj