Forum Discussion

wtwagon_99154's avatar
wtwagon_99154
Icon for Nimbostratus rankNimbostratus
Oct 24, 2014

Migration tomorrow from v9 to v11.. worried about cookies

Hello,

I am doing a migration from an older version (v9) to a new one (v11) shortly am and curious as to whether or not this iRule will work from v9. It took on the unit itself, and there are probably better ways to do it now.. but for times sake, wanted to verify.. Thanks

iRule is:

when HTTP_RESPONSE { if { [HTTP::host] == "xyz.xyz.com" } { pool xyz } elseif { [HTTP::host] == "xyz.blah.com" } { pool blah } foreach cookie [HTTP::cookie names] { set value [HTTP::cookie value $cookie];

if { $value != "" && $cookie != "abc" && $cookie != "abcd" && $cookie != "abcde" && $cookie != "abcdef" }  {
 set testvalue [string tolower $value]
 set valuelen [string length $value]
 set value "$value; HttpOnly";

 if { [string length $value] > $valuelen} {
    HTTP::cookie value $cookie "${value}"
  }
}

}