ltm rule command BOTDEFENSE cs allowed
iRule(1) BIG-IP TMSH Manual iRule(1)
BOTDEFENSE::cs_allowed
Returns or sets whether it is allowed for Bot Defense to take a client-side action.
SYNOPSIS
BOTDEFENSE::cs_allowed (BOOLEAN)?
DESCRIPTION
Returns or sets if the client-side actions (browser challenge or CAPTCHA challenge or
allow_and_browser_challenge_in_response or Device-ID) are allowed on this request. By default, only requests
to URLs which are detected as HTML URLs are cs_allowed (qualified), but this command can override this
detection.
Using this command during BOTDEFENSE_ACTION event to modify the value will have no effect and will be ignored.
Using this command during BOTDEFENSE_REQUEST or HTTP_REQUEST event to modify the value will override the
detection.
If this command is called with a "true" argument, while the value of BOTDEFENSE::cs_possible is "false", the
command will be ignored, and the value of BOTDEFENSE::cs_allowed will remain "false".
Syntax
BOTDEFENSE::cs_allowed
* Returns a boolean value whether it is allowed for Bot Defense to take a client-side action.
* Calling the command without any arguments is only allowed from the BOTDEFENSE_REQUEST event or the BOTDEFENSE_ACTION event. Calling this command without any arguments from any other event will result in a runtime TCL exception.
BOTDEFENSE::cs_allowed
* Allows or disallows Bot Defense to take a client-side action on the request. The is a boolean, which accepts any of the following formats:
+ 0 / 1
+ false / true
+ disable / enable
+ disabled / enabled
+ no / yes
* If this command is called with a "true" argument, while the value of BOTDEFENSE::cs_possible is "false", the command will be ignored, and the value of BOTDEFENSE::cs_allowed will remain "false".
RETURN VALUE
* When called without any arguments: Returns whether a client-side action is allowed to be taken by Bot
Defense. If the value was overridden, the returned value is the overridden one. * When called with an
argument for overriding the value of cs_allowed, no value is returned.
VALID DURING
ALL_EVENTS, HTTP_REQUEST, BOTDEFENSE_REQUEST, BOTDEFENSE_ACTION
EXAMPLES
# EXAMPLE: Always allow client-side actions to be taken on URLs with the .html extension.
when BOTDEFENSE_REQUEST {
if {[HTTP::uri] ends_with ".html"} {
BOTDEFENSE::cs_allowed true
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-12.1 --First introduced the command.
BIG-IP 2020-06-23 iRule(1)