Forum Discussion
Session Persistence based on http header value using iRule
- Sep 16, 2021
when HTTP_RESPONSE {
if { [HTTP::header exists "X-Token"] } {
if { [HTTP::header "X-Token"] != "" } {
persist add uie [HTTP::header "X-Token"]
}
}
}
when HTTP_REQUEST {
if { [HTTP::header exists "X-Auth-Token"] } {
set value [persist lookup uie [HTTP::header "X-Auth-Token"]]
log local0. "value is $value"
if { $value != "" } {
persist uie [HTTP::header "X-Auth-Token"]
}
}
}
when HTTP_RESPONSE {
if { [HTTP::header exists "X-Token"] } {
if { [HTTP::header "X-Token"] != "" } {
persist add uie [HTTP::header "X-Token"]
}
}
}
when HTTP_REQUEST {
if { [HTTP::header exists "X-Auth-Token"] } {
set value [persist lookup uie [HTTP::header "X-Auth-Token"]]
log local0. "value is $value"
if { $value != "" } {
persist uie [HTTP::header "X-Auth-Token"]
}
}
}
working successful! thank you so much xuwen
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