Forum Discussion

pascal_raemy's avatar
pascal_raemy
Icon for Nimbostratus rankNimbostratus
Apr 28, 2017

Forward POST when APM Session closed

I am using APM to authenticate users when connect to Web Server. On the Web Server, when i click on the Logout, a POST request is generated and sent to the server. To Logout the APM Session, i am looking for a string in the URL (/jazz/logout/) and then close the session. The problem i have is that the POST does not reach the Web SErver and the session stay open on the Web Server which consume resources. How can i forward the POST request to the server and at the same time close the connection on the APM?

 

  • Hi,

    you can try this irule:

    when CLIENT_ACCEPTED {
        set disconnect 0
    }
    
    when ACCESS_ACL_ALLOWED {
        if { [HTTP::uri] equals "/jazz/logout/ } {
            set disconnect 1
        }
    }
    
    when HTTP_RESPONSE {
        if {$disconnect} {
            HTTP::respond 302 noserver Location "/vdesk/hangup.php3" Connection Close
        }
    }