I’m trying to create an iRule that will modify the source_addr so that our fallback persistence will work using Akamai. Akamai does pass over the user’s IP address in the request in a header named “True-Client-IP”. I’d like to use this header to replace the source_addr so that fallback persistence will work.
I’ve started the following iRule but I’m not sure if it’s even possible to change the source_addr.
Any help would be greatly appreciated.
when HTTP_REQUEST {
if { [HTTP::header exists “True-Client-IP”] } {
log “Client-IP: [IP::remote_addr]”
set client_ip [HTTP::header “True-Client-IP”]
log “True-Client-IP: [IP::client_addr]”
}
}