rajb
Feb 14, 2023Nimbostratus
Trying to find a way to delete cookie with a domain name using irule
Hello,
I'm trying to delete cookie that have a domain name set. For example in the below pciture, there are cookies with domain name reddit, let's say I'd like to delete it with an irule
I checked the documentation and wrote the below irule to test but it doesn't seem to work. Any ideas why it doesn't work ?
when HTTP_REQUEST {
set cookie_names [HTTP::cookie names]
foreach a_cookie $cookie_names {
if { $a_cookie equals "GuysOnlineFilter" } {
if { [HTTP::cookie domain $a_cookie] contains ".sq.org" } {
log local0. "it's working"
#reemove the cookie here
}
}
}
}
Appreciate if anyone could help