Forum Discussion
MDPF52_180608
Nimbostratus
Jan 26, 2015iRule redirect with cookie removal
Hello DevCentral community,
I've a question for you, is possible to remove a cookie on a HTTP::respond 302 redirect ?
Like: if i click on the logout URI , i need to redirect to the homepag...
StephanManthey
Nacreous
Jan 26, 2015Hi MDPF52,
from my perspective it can just be overwritten but not be deleted (here is a sample):
when RULE_INIT {
set static::remove_cookie 1
}
when HTTP_RESPONSE {
if { $static::remove_cookie == 1 } {
if { [HTTP::cookie exists APPSESSIONID] } {
HTTP::cookie remove APPSESSIONID
}
HTTP::cookie insert name APPSESSIONID value "loggedout" path "/" domain "cookietest.lb-net.bit" version 1
}
}
Maybe this helps a bit. So if you test new incoming requests for the cookie and treat them according to your policies.
Make sure to lookup your broswer cache for other domain or path specific cookie from your site. Maybe they need to be overwritten specifically.
Thanks, Stephan
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