Hi, I hope someone can help me.
I want to store the geolocation info of a connection coming from an specific state and transfer it via cookie to the web. I have got this irule but doesnt generate the cookie:
when HTTP_REQUEST {
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]
set state "[whereis [IP::client_addr] state]"
log local0. "Incoming connectionfrom $client_ip and $state"
}
when HTTP_RESPONSE {
HTTP::cookie insert name "webserverRESPONSE" value "$state"
}
Could anyone help me?