Forum Discussion

Mike_Web's avatar
Mike_Web
Icon for Nimbostratus rankNimbostratus
Mar 19, 2018

Using PROFILE::persist to get the persistence cookie name

I am trying to get the value of the "cookie_name" setting out of the cookie persistence profile applied. I get "[wrong args] [PROFILE::persist cookie_name]". This works for TCP profiles "[PROFILE::tcp time_wait_timeout]". There are no docs or examples for this function and yet it was added in v9. We are running 11.3, 11.6, and 12.1 on our devices. What is good working example of this? Depending on the profile we apply to each virtual server, I would expect to get a valid cookie name?

 

EG: [PROFILE::persist cookie_name] => "Some-Cookie-Name"

 

2 Replies

  • You can go with HTTP::cookie

    when HTTP_REQUEST {
    foreach cookie [HTTP::cookie names] {
    log local0. "Cookie name: $cookie, Cookie value: [HTTP::cookie value $cookie]"
       }
    }
    

    Or you can refer the codeshare too.

  • Looking at this code, the Profile::PERSIST syntax is different to yours

     

    PROFILE::persist mode cookie cookie_name