Forum Discussion
MDPF52_180608
Nimbostratus
Feb 02, 2015iRule delete cookie value on a 302 redirect
Hello DevCentral Community,
I want to ask you how I can re-initialize a cookie in order to clean the value in it, like:
If i click on the logout URI my cookie "Cookie_Name" value will chang...
Hannes_Rapp
Nimbostratus
Feb 02, 2015You can accomplish the same for multiple cookies by adding more "Set-Cookie" headers (1 header per cookie to invalidate). If the solution works for you please mark it as answered to help other community members.
HTTP::respond 302 location "https://www.mydomain.com/" \
Set-Cookie "MY_COOKIE_NAME=path=/; domain=.mydomain.com; Expires=Thu, 01-Jan-1970 00:00:00 GMT" \
Set-Cookie "MY_COOKIE_NAME2=path=/; domain=.mydomain.com; Expires=Thu, 01-Jan-1970 00:00:00 GMT" \
Set-Cookie "MY_COOKIE_NAME3=path=/; domain=.mydomain.com; Expires=Thu, 01-Jan-1970 00:00:00 GMT"
- MDPF52_180608Feb 02, 2015
Nimbostratus
Thank you, but maybe i missed something because after the redirect i can see that the cookies are still present in my browser and the page returns me a 404 error code, how i can verify it ?
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