Forum Discussion
Paulius
MVP
rajb What happens if you add the following just before you "Domain name is:" logging line?
log local0. "Cookie name is: ${cookie_name}"
rajb
Feb 16, 2023Nimbostratus
Paulius This the updated irule and the output
when HTTP_REQUEST {
# Check if we have already deleted the cookies
log local0. "Running within HTTP_REQUEST"
if {not [HTTP::cookie exists tracking_cookie]} {
log local0. "Running within tracking_cookie"
# Define an array of cookie names to delete
set cookie_names [list "loadedFromBrowserCache" "_gid" "_ga" "GuysOnlineFilter" "CruisingListingsFilter" "notifycached"]
foreach cookie_name $cookie_names {
set cookieDomain [HTTP::cookie domain "${cookie_name}"]
log local0. "Executing cookie: ${cookie_name}"
log local0. "Domain name is: ${cookieDomain}"
}
}
}
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Running within HTTP_REQUEST
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Running within tracking_cookie
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Executing cookie: loadedFromBrowserCache
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Domain name is:
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Executing cookie: _gid
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Domain name is:
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Executing cookie: _ga
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Domain name is:
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Executing cookie: GuysOnlineFilter
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Domain name is:
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Executing cookie: CruisingListingsFilter
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Domain name is:
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Executing cookie: notifycached
Feb 16 10:15:28 lb1.ptp.local info tmm1[19397]: Rule /Common/delete_cookie_test <HTTP_REQUEST>: Domain name is: