Forum Discussion
Not able to read cookies using F5 iRule
Hi team,
We have a requirement to read the cookie set by backend java application and allow access to other pools based on the cookie value. We are using the below iRule, but we are not able to read any cookies set by application (present on the browser - Eg: JSESSIONID).
Could you please let us know what is missing in this iRule in reading the cookies OR is any limit of not able to read cookies on F5:BigIP (11.3 version)?
Eg: We use below iRule, and always see No cookie present log message though we have that cookie on the browser.
when RULE_INIT { set static::Debug 2 } when HTTP_REQUEST {
if { [HTTP::cookie exists "JSESSIONID"] } { log local0. "The test cookie value is : [HTTP::cookie value JSESSIONID]" HTTP::redirect "https://www.google.co.in" } else { log local0. "No cookie present" HTTP::redirect "https://facebook.com" } }
Thanks, NR
1 Reply
- Eric_St__John
Employee
Is the cookie JSESSIONID in all uppercase? Is the Virtual Server HTTPS, and if so do you have a clientssl profile assigned?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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