Forum Discussion
hooleylist
Oct 10, 2013Cirrostratus
Make sure to unset logoff or set it to 0 if you're setting it in HTTP_REQUEST to avoid removing the cookies on subsequent requests on the same TCP connection:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/logoff.php" } {
set logoff 1
set incoming_cookies [HTTP::cookie names]
} else {
set logoff 0
}
}
when HTTP_RESPONSE {
if { $logoff==0 } {
foreach x $incoming_cookies {
HTTP::header insert Set-Cookie "$x=deleted; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT"
}
}
}
Aaron