Forum Discussion
No output from persist lookup $header1
Thanx for replay both of you.
There was some Christmas and a new year, some other assignments between, so that´s why my feedback have been delayed. I did some redesign so I did not have to use "lookup" command, did not get it to work in the event I needed it. Insted I used a Universal Persistense profile on both virtual servers. Persist profile use "Match Across Virtual Servers" and desired timeout.
Used persist add to add persistence in response header on first vip and then used persist on URI to use same backend with the same value used in response header in other VIP.
I-rule looks somthing like.
when HTTP_REQUEST {
set persist_uri [string tolower [HTTP::uri]]
switch -glob $persist_uri {
"*/example1/content/*" {
set reference_example1 [findstr [HTTP::uri] "/example1/content/" 18 32]
persist uie $reference_example1
log local0. "$Persist on $reference_example1"
}
"*/example2/content/*" {
set reference_example2 [findstr [HTTP::uri] "/example2/content/" 18 32]
persist uie $reference_example2
log local0. "Persist on $reference_example2"
}
}
when HTTP_RESPONSE {
if { [HTTP::header exists "Referense_Header"] } {
set reference_token [HTTP::header value "Referense_Header"]
persist add uie $reference_token
log local0. "Persist record in PaymentRequestToken Header , payment reference = $payment_token"}
}
}
(Pool selection and all other logic is done in I-rule attached to VIP).
Works perfect in my case!
Regards
//Goran
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