Kadall_14553
Jun 01, 2016Nimbostratus
Trying to log cookies that are not encrypted. Need some iRule syntax help
I'm trying to look in the HTTP response to get the names of all the cookies that get set in the connection for configuring encryption in the profiles. I found that all the cookies values that are encrypted have an ! at the beginning. So what I came up with so far is this:
when HTTP_RESPONSE {
Loop through each cookie by name
foreach cookie [HTTP::cookie names] {
set cookievalue [HTTP::cookie value $cookie]
if { $cookievalue starts_with "!" } {
Log the cookie name and value
log local0. "Virtual Server: [virtual name], Cookie name: $cookie, Encrypted Cookie value: [HTTP::cookie value $cookie]"
}
}
}
This gets me cookies that are encrypted and logs them but what I want is to log the ones that I haven't found yet so I can put those in the profile. A simple reverse of this as NOT starts_with should work but I can't find the correct syntax.
Thanks for any help!