Forum Discussion

Steve_Lyons's avatar
Steve_Lyons
Ret. Employee
Jul 19, 2018

Anyone willing to share their favorite logout iRule?

I have something basic to tell the user to close the browser though I was curious to see what the community has. My particular use case is simply a portal access resource that auto logs in even after selecting log out because of middle ware that caches credentials. With that, I don't want to limit your responses to just my use case. Thanks!

when HTTP_REQUEST {
log local0. "[HTTP::uri]"
switch -glob [HTTP::uri] {
    "*/tmui/logout.html" {
        HTTP::respond 200 content "Logged Out.  Close Browser."
    }
    default {
    }
  }
}

1 Reply

  • If you are looking for a quick solution to request users to close the browser, the above works though I would love to get more feedback from others in the field about what they do. For my use case, even after a user clicks logout, due to credentials being cached through middle ware they were immediately logged back in. The iRule above prevents that and requests the user close the browser.