12-Jan-2022
04:15
- last edited on
04-Jun-2023
19:13
by
JimmyPackets
Hello,
we are testing an irule to remove all cookie from the client browser after an idle time, the cookie for TCP isn't what we are looking for rather than the actual cookie sent to the server.
any suggestion on how to achieve this, if I inserted a cookie manually I want the irule to delete it after I refresh the page.
we are testing this on BIG-IP LTM
?irule example :
when HTTP_REQUEST {
}
when HTTP_RESPONSE {
set cookieNames [HTTP::cookie names] #array of cookies
foreach aCookie $cookieNames { #adding the cookies to the array in a varaible aCookie
HTTP::cookie remove $aCookie #removing the virable
}
}
15-Jan-2022
08:42
- last edited on
04-Jun-2023
19:13
by
JimmyPackets
Something like this:
when HTTP_REQUEST {
set request_cookies [HTTP::cookie names]
}
when HTTP_RESPONSE {
foreach a_cookie $request_cookies {
log local0. "Remove cookie: $a_cookie"
HTTP::header insert Set-Cookie "$a_cookie=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;path=/"
}
}