Help with 11.4+ Local Traffic Policies, cookie domain mangling.
Hello. I know I can do this with an iRule - but I was hoping someone could tell me how (or if) I can do this using the new local traffic policies instead.
Briefly - I am trying to rewrite response to the client as follows:
client: GET / Host: www.example1.com
server will respond: Set-Cookie: JSESSIONID=blah; path=/
we want to change this to: Set-Cookie: JSESSIONID=blah; path=/; domain=.example1.com
... maybe I'm totally on the wrong track. I was trying with local traffic policies but couldn't figure out how to grab the domain of the host header to use to overwrite the (unset) domain portion of the response cookie. So I was content trying to just do the equivalent of if/ elsif / depending on the domain. ie: Host: www.example1.com add domain=.example1.com to the JSESSIONID returned, and so on.
Wile I can easily set a cookie or overwrite a cookie completely conditionally based on Host value - I couldn't find a way to preserve the rest of the contents while only modifying the domain.
Should I use iRules for this still? Or is there a built in primitive to do this already?
Thanks so much in advance!