For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

MarqueB_335123's avatar
MarqueB_335123
Icon for Nimbostratus rankNimbostratus
Oct 01, 2017

iRule for JSESSIONID persistence and Cookie Path rewrite

Hello - I'm new to writing iRules and would like some guidance in creating an iRule for HTTP Response for persistence using JSESSIONID and which also rewrites the cookie path.

 

Thanks in advance for your assistance.

 

MB

 

1 Reply

  • Weblogic JSessionID Persistence https://devcentral.f5.com/codeshare?sid=738

    To modify the cookie path an irule such as the following may be used ...

    when HTTP_RESPONSE { 
      set cookies [HTTP::cookie names] 
      foreach cookie $cookies { 
        set cookie_value [HTTP::cookie $cookie] 
        set cookie_path "/MyCustomPass" 
        HTTP::cookie remove $cookie 
        HTTP::cookie insert name $cookie value $cookie_value path $cookie_path 
      } 
    }