Forum Discussion
6 Replies
Sort By
- JRahmAdminCheck out the wiki:
- João_Assad_4295NimbostratusOk here is the problem.
- JRahmAdminTake a look at this thread:
- João_Assad_4295Nimbostratus-
- João_Assad_4295Nimbostratusmy mistake.
when HTTP_RESPONSE { if { [HTTP::cookie exists "BIGipServermy_pool"] } { If the cookie does exist, let's grab the contents. set old_cookie [HTTP::cookie BIGipServermy_pool] log local0.NOTICE "OLD: $old_cookie" Now we delete it, then re-insert it with the domain info we want added. HTTP::cookie remove BIGipServermy_pool HTTP::cookie insert name BIGipServermy_pool value $old_cookie domain mydomain.com set new_cookie_domain [HTTP::cookie domain BIGipServermy_pool] set new_cookie [HTTP::cookie BIGipServermy_pool] log local0.NOTICE "NEW: $new_cookie" log local0.NOTICE "NEW: $new_cookie_domain" } }
- João_Assad_4295NimbostratusAfter 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.
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 "/" } } }