Forum Discussion
Jason_46811
Oct 26, 2010Nimbostratus
Akamai - Hash persistence based on true-client-IP
Hi,
i am a complete newbie to irules. I have the same requirement as Jeff to create a Hash persistence based on a custom inserted header true-client-IP as i am also using Akamai. This will have to work for both http and https traffic. I have tried to assemble the code as follows but i am receiving a syntax error of: line 1: [braces are required around the expression] [when HTTP_Request {
(http://devcentral-sea.f5.com/Forums...fault.aspx)
when HTTP_REQUEST {
if {[HTTP::header exists "True-Client-IP"]}{
set tcip_header [HTTP::header "True-Client-IP"]
} else { set tcip_header "1.1.1.1"
}
if {[active_members Onlinebrands_http_real_server]}{
if {[scan [lindex [active_members –list app_http_pool] [expr {[md5 $tcip_header] % [active_members app_http_pool]}]] {%s %s} ip port] == 2}{
pool app_http_pool member $ip $port
return
}
}
}
Thanks, Jason
- Chris_MillerAltostratus
when HTTP_REQUEST { if {[HTTP::header exists "True-Client-IP"]}{ set tcip_header [HTTP::header "True-Client-IP"] } else { set tcip_header "1.1.1.1" } if {[active_members Onlinebrands_http_real_server]}{ if {[scan [lindex [active_members –list app_http_pool] [expr {[md5 $tcip_header] % [active_members app_http_pool]}]] {%s %s} ip port] == 2}{ pool app_http_pool member $ip $port return } } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects