Forum Discussion
JosephT
Nimbostratus
Jul 22, 2008Stripping cookies on the http response
I need to setup an irule to remove one or more cookies on the response back to the client.
To start, I'm trying to just delete all cookies by trying this this:
when HTTP_RESPONSE {
HTTP::cookie remove *
}
as well as this:
when HTTP_RESPONSE {
HTTP::cookie remove "*"
}
Yet neither seem to be doing the job (i still see a cookie on my client.
Any ideas?
Any help as well to write an irule to remove:
cookie_name_a
cookie_name_b
cookie_name_c
would be greatly appreciated!
- The_Bhattman
Nimbostratus
Not sure if that command will work with *. - JosephT
Nimbostratus
CMBHATT, thanks for the reply. After speaking to some others, I learned that the "HTTP:cookie remove xxxx would not work with the HTTP_RESPONSE. - hoolio
Cirrostratus
'HTTP::cookie remove' should work in either requests or responses. If you want to remove all cookies, you could use either approach:when HTTP_RESPONSE { foreach N [HTTP::cookie names] { HTTP::cookie remove $N } }
when HTTP_RESPONSE { HTTP::header remove "Set-Cookie" }
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