Forum Discussion

Ian_Curtis_2791's avatar
Ian_Curtis_2791
Icon for Nimbostratus rankNimbostratus
Jul 15, 2016

iRule modifies the cookie to include the domain name

Hi , I am new to irules and I have a question and hope someone help me. I need to add a domain name to a certain cookie (modify the cookie to include the domain name also) and an irule to do the same for the all cookies.

 

I have did this for all the cookies (I don't know if its a valid one) rule Add_Domain_To_Cookie {

 

when HTTP_RESPONSE { set newdomain "abcdef.com" foreach mycookie [HTTP::cookie names] { HTTP::cookie domain $mycookie $newdomain } } }

 

1 Reply

  • See these 2 links:

     

    https://devcentral.f5.com/questions/irule-to-rewrite-cookie-domain

     

    https://devcentral.f5.com/questions/setting-the-domain-of-a-cookie