Forum Discussion
jsessionID iRule
Here is the output from code share...
when HTTP_RESPONSE { if { [HTTP::cookie exists "JSESSIONID"] } { persist add uie [HTTP::cookie "JSESSIONID"] } } when HTTP_REQUEST { if { [HTTP::cookie exists "JSESSIONID"] } { persist uie [HTTP::cookie "JSESSIONID"] } }
How do I take this iRule and ignore case? Unfortunately the dev team can't seem to keep case with their cookies, so some are JSessionID, some are JSESSIONID, some are jsessionid and some are jsessionID. Is there a way to ignore case or add an or statement to look for all of them?
1 Reply
- cjunior
Nacreous
Hi, could you try this way?
when HTTP_REQUEST { set jsessionid [lsearch -inline -regexp [HTTP::cookie names] {[J|j][S|s][E|e][S|s][S|s][I|i][O|o][N|n][I|i][D|d]}] if { $jsessionid ne "" } { persist add uie [HTTP::cookie $jsessionid] } }Regards [ ]
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