Erik_27939
Sep 25, 2013Nimbostratus
iRule HTTP::header exists
I am attempting to check if an HTTP header exists but the rule will not save due to an error in the if statement. The HTTP:header devcentral page shows an example just like what I am using. Any help would be greatly appreciated. See below.
when CLIENT_ACCEPTED {
if { [HTTP::header exists "Bonafide-Client-IP"] } {
set trueIP [HTTP::header "Bonafide-Client-IP"]
} else {
set trueIP [IP::client_addr]
}
if { [class match trueIP equals bot_list] } {
log local0. "BOT_CHECK: IP found in bot_list! Sending [IP::client_addr] to bad bot pool..."
pool corp_pool_bad_bot
}
}