Forum Discussion

Helena_101649's avatar
Helena_101649
Icon for Nimbostratus rankNimbostratus
Jan 31, 2013

HTTPClass and Cookie value match

Hello,

¿can I create an httpclass matching a cookie value? Not the cookie name, but the value of a given Cookie, something like

HTTP::cookie
value 
iRule command.

Thanks.

4 Replies

  • It doesn't look like you can do it using a Cookie List in a HTTP Class but you can using a Header List.

     

     

    See here: http://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-concepts-11-3-0/ltm_protocol_profiles.html1210980

     

    Header List: "Specifies individual headers and their values that the BIG-IP system uses as criteria for routing HTTP requests"
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    As Steve said, you can use the header list for this. Or if you want to select an HTTP class on more advanced logic you can use the HTTP::class select $class_name command in an iRule:

     

     

    https://devcentral.f5.com/wiki/iRules.http__class.ashx

     

     

    Aaron
  • Hello,

     

     

    specifying a Header with a value "*Cookie: cookiename=cookievalue*" work's fine. Thanks a lot!

     

    Aaron, I didn't try the iRule option because I am working on an httpclass profile precisely to avoid using a iRule, for performance issues. (Ten Steps to iRules Optimization: "1 - Use a Profile First). I already have a iRule to make pool selection based on Cookie value matching, and it also works fine.

     

    I don't know if this way will be more efficent, but at least I have the two methods.

     

     

    Thanks again for your time and knowledge.