Forum Discussion
Chris_Miller
Altostratus
Apr 22, 2010iRule for Cookie Removal
I have 2 DCs fronted by a software GTM solution. When a user makes a request, GTM checks to see if they have a "DC" cookie. If they don't, it round robins the request. In the event that DC1 gets the r...
The_Bhattman
Nimbostratus
Apr 22, 2010Hi Cript2000,
If I am following your logic you want to remove the cookie from the client context?
If so then you would need to use the HTTP_RESPONSE event.
Here is the untested iRule
when HTTP_REQUEST {
set the value for location in the cookie
set StrDC [HTTP::cookie "DC"]
}
when HTTP_RESPONSE {
checks to see if there is a 1 or a cookie header with no value
if { ($StrDC== "1") or {$StrDC=="" } {
HTTP::cookie remove "DC"
HTTP::cookie remove "server"
}
}
I hope this helps
Bhattman
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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