ltm rule command BOTDEFENSE cookie age
iRule(1) BIG-IP TMSH Manual iRule(1)
BOTDEFENSE::cookie_age
Returns the age of the Bot Defense cookie in seconds.
SYNOPSIS
BOTDEFENSE::cookie_age
DESCRIPTION
Returns the age of the Bot Defense browser cookie in seconds. This is only relevant if the value of
BOTDEFENSE::cookie_status is either "valid", "expired" or "renewal"; otherwise, -1 is returned.
Note that In the previous version the returned status referred to both device_id and browser challenge, but
now it only returns the age of the browser challenge.
Syntax
BOTDEFENSE::cookie_age
RETURN VALUE
Returns the age of the Bot Defense cookie in seconds, or -1 if not applicable.
VALID DURING
BOTDEFENSE_REQUEST, BOTDEFENSE_ACTION
EXAMPLES
# EXAMPLE: In case of an expired cookie, log the age of the cookie
when BOTDEFENSE_REQUEST {
if {[BOTDEFENSE::cookie_status] eq "expired"} {
set log "expired botdefense cookie (from [BOTDEFENSE::cookie_age]"
append log " seconds ago) from IP [IP::client_addr]"
HSL::send $hsl $log
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-12.1 --First introduced the command.
BIG-IP 2020-06-23 iRule(1)