Forum Discussion

NetWork's avatar
Icon for Nimbostratus rankNimbostratus
Dec 23, 2020

iRule to delete the cookies

We have a requirement to delete the SSO cookies after logging out the application. Can someone help if this can be achieved through iRule?

1 Reply

  • Do you mean the APM session or other SSO cookies, try testing this or feel free to customize if you know the cookie name.

    ltm rule remove_logout_cookie {
    when HTTP_REQUEST {
      set logging_out 0
      set cookie_names [HTTP::cookie names]
      if {[string tolower [HTTP::path]] ends_with "logout.php" } {
        set logging_out 1
    when HTTP_RESPONSE {
      if { $logging_out == 1 }{
        foreach cookie_name $cookie_names {
    	  HTTP::cookie remove $cookie_name