BOTDEFENSE::cs_allowed

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

Warning

Deprecated in BIG-IP Next v20.0.1


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 <value>

  • 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”.

Syntax

BOTDEFENSE::cs_allowed (BOOLEAN)?

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
     }
 }

Change Log

  • Introduced: BIGIP-12.1
  • Deprecated: BIGIP-20.0.1

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.