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...
Michael_Jenkins
Cirrostratus
Jan 26, 2015To add to what Stephan said, when we do things like this on a redirect, here's what my iRule generally looks like the following. Like Stephan said, you'll need to make sure you're removing the cookie with at right path (and at the right domain if you're setting domain level cookies anywhere)
when HTTP_REQUEST {
... prior code
HTTP::respond 302 Location "Redirect URL" "Set-Cookie" "CookieName=deleted; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"
return
}
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