CATEGORY::safesearch

Description

This iRules command 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 for multiple results)
Note: This command requires the SWG license.

Syntax

CATEGORY::safesearch <url>

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