Forum Discussion

suthomas1's avatar
suthomas1
Icon for Cirrostratus rankCirrostratus
Dec 16, 2020

cookies

Good day all,

 

I am having some trouble with this irule about cookies. Not very much into irule hence can't get the full scenario here on what does this achieve.

Appreciate some assistance on what this rule is doing & how to check if its doing it .

 

when HTTP_REQ {

  

  set log_prefix "[IP::client_addr]:[TCP::client_port]"

     

  if { [HTTP::cookie "JSESSIONID"] ne "" }{

    persist uie [string tolower [HTTP::cookie "JSESSIONID"]] 5400

   

   

  } else {

   set jsess [findstr [string tolower [HTTP::path]] "jsessionid=" 11]

    

   if { $jsess != "" } {

     persist uie $jsess 5400

     

   }

  }

}

when HTTP_RESP {

   if { [HTTP::cookie "JSESSIONID"] ne "" }{

    persist add uie [string tolower [HTTP::cookie "JSESSIONID"]] 5400

    }

}

 

Thank you in advance.

1 Reply

  • Hello Suthomas

    This iRule provides a way of using persistence by cookie (JSESSION). The behaviour is describe here:

    https://devcentral.f5.com/s/articles/weblogic-jsessionid-persistence

    Instead of using this iRule you can use a Cookie Hash using the same JSESSION as cookie name.

    ​https://support.f5.com/csp/article/K6586

     

    Or some other methods

    https://support.f5.com/csp/article/K83419154

     

    Regards,

    Dario.