Forum Discussion
João_Assad_4295
Nimbostratus
Mar 22, 2006persistence cookie domain
When using the cookie persistence profile, there is no way to configure the cookie domain. Is there a way to do it via iRules ?
João_Assad_4295
Nimbostratus
Apr 13, 2006After some testing I noticed that the iRule above has a problem. If more than one cookie is set on the response, the extra set-cookies will be lost and only the BIGipServermy_pool set-cookie will be sent to the client.
So I made the following iRule that removes and resinserts every cookie that was set on the response.
when HTTP_RESPONSE {
set cookies [HTTP::cookie names]
look for a persistence cookie being set
if { $cookies contains "BIGipServer" } {
rewrites all cookies being set
foreach cookie_name $cookies {
set cookie_value [HTTP::cookie $cookie_name]
HTTP::cookie remove $cookie_name
HTTP::cookie insert name $cookie_name value $cookie_value domain "mydomain.com" path "/"
}
}
}
This way no cookie is lost.
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