Forum Discussion
Muhammad_64435
Aug 09, 2011Nimbostratus
How to clean LTM cookies
Hello,
We host multiple websites on a single domain hence single virtual server and single irule for all those websites. Consumer requests to a particular website is maintained through Cookie persistence with 1 hour expiry. Cookie persistence is applied through Cookie persistence profile applied on Virtual server.
The issue we are seeing is when a consumer jumps a website LTM starts seeing two or more cookies and send the request to the wrong pool:node pair.
Is something similar to the following possible in iRules ?
HTTP_REQUEST {
if { grep BIGipServer [HTTP::cookie names] > 1 } {
Remove all bigip cookies starting with BIGipServer
HTTP::cookie remove "BIGipServer*"
}
There are other cookies present in the header from application etc. So can't remove "all" cookies.
I appreciate any help or idea.
Thank you,
- Michael_YatesNimbostratusYou said in your post that you are using a single Virtual Server and have multiple websites pointed to it.
- Muhammad_64435NimbostratusThanks for checking ...
when HTTP_REQUEST { set uri [HTTP::uri] log local0. "http request uri -> $uri " Catch 1: for capturing cIDs from query like URI e.g. "/shopperDisplay?linkID=ABC&shopperstatus=null" or similar situation will catch ABC here set cID [URI::query $uri "linkID"] log local0. "http request cID -> $cID " if { $cID == "" } { if { $cID == "" } { log local0. "extract the cID from COOKIE now " will catch ABC again here set cID [findstr [HTTP::cookie names] BIGipServer 11 " " ] Catch 3: even Cookie doesn't exists -- BAD request if { $cID == "" } { log local0. "BAD REQUEST -- redirect to sorry page" HTTP::redirect "http://sorry.domain.com/bigip/sorry.html?[HTTP::host][HTTP::uri]" } } } pool $cID }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects