Forum Discussion

MDPF52_180608's avatar
MDPF52_180608
Icon for Nimbostratus rankNimbostratus
May 26, 2015

APM User Session - Logout Problem

Hello Community,

 

I'm facing a problem with a web application secured with APM.

 

I have configured the logout URI in the Access policy (/logout.html) then i have applied an iRule in order to delete the user session and then redirect it to the login page. It doesn't works because when the user click on the logout button the browser prompts "Connection Aborted".If he refresh the web page then the redirect works.

 

iRule configured:

 

when ACCESS_ACL_ALLOWED { if { [HTTP::uri] equals "/logout.html" } { ACCESS::session remove HTTP::redirect "https://[HTTP::host]" } Please, can anyone help me ?

 

Thanks in advance.

 

M.

 

2 Replies

  • Josiah_39459's avatar
    Josiah_39459
    Historic F5 Account

    Please try:

    when ACCESS_ACL_ALLOWED {
      if { [HTTP::uri] equals "/logout.html" } {
        HTTP::redirect "https://[HTTP::host]/vdesk/hangup.php3"
      }
    }
    
  • Instead, I would use:

     

    when ACCESS_ACL_ALLOWED {
      if { [HTTP::uri] equals "/logout.html" } {
        ACCESS::respond 302 Location "https://[HTTP::host]/vdesk/hangup.php3" Connection close
      }
    }

    The purpose of the logout option on the access policy is to display the page from a backend server as a friendly logout page. So, if this page does not exist in your pool member then you probably got the reset message. In this iRule example you code a custom page that simply re-directs to the default product supplied page. I like to use this approach so that applications can be coded with this friendly name and we can easily add/remove logic for logout processing.