Forum Discussion
client connection persistence using an irule
Sorry for late reply, I've been away. Your header name doesn't look right, you can't have whitespace in the header name, I think you mean
[HTTP::header exists "iv-remote-address"]
Other than that it should be fine, just try it by replacing "client-ip" in my iRule example and with the name of the header you're looking for.
applied this to the uie profile.
when HTTP_REQUEST {
if {[HTTP::header does exists iv-remote-address]} {
persist uie [HTTP::header value iv-remote-address]
}
}
when HTTP_RESPONSE {
if {[HTTP::header exists iv-remote-address]} {
persist add uie [HTTP::header value iv-remote-address]
}
}
and trying to apply this to the VS config and running into syntax errors.
when HTTP_REQUEST {
if { [HTTP::header exists "iv-remote-address"] } {
log local "iv-remote-address is [HTTP::header value iv-remote-address]
persist uie [HTTP::header value iv-remote-address] }
else {
log local "persist on[IP::client_addr]
persist uie [IP::client_addr] }
}
Recent Discussions
Related Content
* 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