Forum Discussion

AngryCat_52750's avatar
AngryCat_52750
Icon for Nimbostratus rankNimbostratus
Dec 31, 2013

logout uri & access removal

I have an irule that searches for our applications logout request and it logs them out and redirects them back to the login screen..

when ACCESS_ACL_ALLOWED {
    if { [HTTP::uri] equals "/myconnections/logout" } {
        ACCESS::session remove
        HTTP::redirect "https://[HTTP::host]"
    }
}

That works fine but when i get back to the login screen, i cant login again.. i see in the reports that when i am redirected to the login page, a new session is created and i go through the APM flow to get to the login page, then i see this -

\N: Session deleted due to admin initiated termination.

And if i close the browser and re-open it, everything works fine..

any ideas?

1 Reply

  • Try this:

    when ACCESS_ACL_ALLOWED {
        if { [HTTP::uri] equals "/myconnections/logout" } {
            ACCESS::session remove
            ACCESS::respond 302 Location "http://[HTTP::host]" "Set-Cookie" "MRHSession=0; expires=Tuesday, 29-Mar-1970 00:15:00 GMT" "Connection" "Close"
        }
    }