Forum Discussion
bedwards311_338
Nimbostratus
Jun 11, 2018iRule - create cookie and insert value of client FQDN
I am trying to create an iRule that will create a cookie on the client and insert the client FQDN and client IP address into the cookie. So far, the iRUle will insert the client IP address but I can'...
youssef1
Cumulonimbus
Jun 11, 2018Hi,
try this:
when HTTP_REQUEST {
set hostname [HTTP::host]
set client_ip [IP::client_addr]
set nocookie 1
if { [HTTP::cookie exists LBSRC] } {
set nocookie 0
}
}
when HTTP_RESPONSE {
if {$nocookie} {
HTTP::cookie insert name LBSRC value "$hostname $client_ip"
}
}
Let me now if you need more details...
Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
