Invalidate cookie on klient side
Hi,
I have an issue with a client cookie that are causing some issues. To avoid pushing out a new application deploy in production I like to do a fix in the BigIP until we have the next maintenance where the application is patched.
I found an example in this forum that I have modified. The cookie I like to modify exists in two different versions with the same name. So I need to check some parameters in the cookie to make sure that its the correct cookie.
Name: METRICS
Domain: .bar.com
Path: /
I have this iRule that I have one issue with. With I try to do a match class to the Path to be "/" I get the following error:
01070151:3: Rule [/Common/METRIC-cookie] error: Unable to find value_list (/) referenced at line 4: [class match [HTTP::cookie "Path"] eq "/"]
when HTTP_REQUEST {
Check the User-Agent string
if { ([HTTP::cookie exists "METRICS"] && [class match [HTTP::cookie "Domain"] eq ".bar.com"] && [class match [HTTP::cookie "Path"] eq "/"])} {
Set a variable to check the cookie in the response
set check_cookie 1
} else {
Set a variable to check the cookie in the response
set check_cookie 0
}
}
when HTTP_RESPONSE {
Check if cookie exists
if { $check_cookie && [HTTP::cookie exists "METRICS"]}{
Update cookie expiry time
HTTP::cookie expires METRICS 1388534400
}
}