ltm rule command CATEGORY safesearch
iRule(1) BIG-IP TMSH Manual iRule(1)
CATEGORY::safesearch
Get safe search key and value pairs.
SYNOPSIS
CATEGORY::safesearch URL
DESCRIPTION
Checks for safe search parameters for the given URL, returns them in
list form with the first entry being the key, and the second being the
value. Repeated in list for multiple results. (requires SWG license)
RETURN VALUE
Returns a list of alternating key and value pairs. E.g.: [key1, value1,
key2, value2]
VALID DURING
HTTP_REQUEST CATEGORY_MATCHED
EXAMPLES
when HTTP_REQUEST {
set this_uri http://[HTTP::host][HTTP::uri]
set reply [CATEGORY::safesearch $this_uri]
set len [llength $reply]
if { $len equals 2 } {
log local0. "uri $this_uri returns safesearch key=[lindex $reply 0] and value=[lindex $reply 1]"
if { not([HTTP::uri] contains "&[lindex $reply 0]=[lindex $reply 1]") } {
HTTP::uri [HTTP::uri]&[lindex $reply 0]=[lindex $reply 1]
}
}
}
HINTS
Requires SWG license
SEE ALSO
CHANGE LOG
@BIGIP-11.6.0
--First introduced the command.
BIG-IP 2017-01-31 iRule(1)