ltm rule command BOTDEFENSE client typeΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

BOTDEFENSE::client_type
       Returns the client type: browser, mobile application or bot.

       This command is kept for compatibility with previous releases. We encourage using BOTDEFENSE::client_class
       instead, because it gives a better resolution of the bot classification and is consistent with the terminology
       of the Bot Defense profile and reports.

SYNOPSIS
       BOTDEFENSE::client_type

DESCRIPTION
       Returns the client type. The returned value is one of the following strings:
	   * bot - if the client was detected as a bot.
	   * mobile_app - if the client is a mobile app using F5 Anti Bot mobile SDK.
	   * browser - if the client is a Web browser.
	   * uncategorized - if the client type could not be determined.

       Syntax

       BOTDEFENSE::client_type

RETURN VALUE
       A string signifying the client type.

VALID DURING
       BOTDEFENSE_ACTION, BOTDEFENSE_REQUEST

EXAMPLES
	# EXAMPLE: Redirect bots to a honeypot page
	 when BOTDEFENSE_ACTION {
	     if {[BOTDEFENSE::client_type] eq "bot"} {
		 set log "Request from a Bot on "
		 append log "IP [IP::client_addr]"
		 HSL::send $hsl $log
		 HTTP::redirect "https://www.example.com/honeypot.html"
	      }
	 }

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-13.1 --First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)