rjordan
Jul 30, 2010Nimbostratus
Setting the domain of a cookie
Up until now, we were able to handle all of our persistence needs with the default cookie persistence. Now we have an application running on www.foo.com and sub.foo.com. We need to maintain persistence across the subdomains (which point to the same VS).
When I access www.foo.com, the domain of the cookie is set to "foo.com", which is not valid for sub.foo.com. Setting the cookie domain to "(dot).foo.com" should fix my persistence issues, but I'm not quite sure how to accomplish this.
Would I create an iRule using the necessary HTTP::cookie settings, then associate it with a new cookie persistence profile? Can someone point me in the right direction with a basic example? I checked the code share and didn't find much that would help. I feel that if I could replicate the default cookie persistence with an iRule, then I could easily tweak the domain setting.
Thanks.