Forum Discussion
ekaleido_26616
Aug 17, 2016Cirrocumulus
Perhaps something like this to replace your HTTP::response 200s?
switch [whereis $client_ip abbrev] {
"NJ" { HTTP::header insert User-Loc "NJ" }
"ID" { HTTP::header insert User-Lov "ID" }
}
- F5Hopper_28651Aug 17, 2016Nimbostratus
that looks good, I will give that a try.
when HTTP_REQUEST { if { ([string tolower [HTTP::uri]] starts_with "/testingpage") } { Parse the client IP from the CDN header set client_ip [HTTP::header "Incap-Client-IP"] if { $client_ip eq "" }{ The header was empty/did not exist, so use the actual client IP set client_ip [IP::client_addr] } switch [whereis $client_ip abbrev] { "NJ" { HTTP::header insert User-Loc "NJ" } "ID" { HTTP::header insert User-Loc "ID" } "CA" { HTTP::header insert User-Loc "CA" } } } }