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) are allowed on this request. By default, only
requests to URLs which are detected as HTML URLs are cs_allowed, but
this command can override this detection. Bot Defense uses this
variable when deciding on the action to take, so, setting it before the
BOTDEFENSE_ACTION event may affect the action taken by Bot Defense.
When forcing an action using the BOTDEFENSE::action command, the
cs_allowed value is ignored. That is, it is possible to force a client-
side action even if cs_allowed is "false". The cs_allowed value only
affects the default decision made by Bot Defense, before the
BOTDEFENSE_ACTION event is raised.
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
* Normally, overriding the cs_allowed value, would be done from either the HTTP_REQUEST or the BOTDEFENSE_REQUEST events. It is, however, allowed on any event. Overriding the value from the BOTDEFENSE_ACTION event will have no effect, because the Bot Defense already decided on the default action.
* 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 2017-01-31 iRule(1)