Forum Discussion

Erik's avatar
Erik
Icon for Nimbostratus rankNimbostratus
Feb 11, 2014

irules and session cookies

Hi, I wish to be able to delete the cookie that is created when a session is enabled through APM using Cookie persistent. The reason is that i have a connection to a Citrix Webinterface and the inactivity timeout is set to be 20 min in Citrix. When web interface terminates the session cookie is not deleted and can be reused in a new browser tab. Logout URI that is generated when Citrix trigger the inactivity timeout is /vdesk/hangup.php3

 

1 Reply

  • To answer your question try this (where mycookie is set to your cookie name, and Path is set as appropriate);-

    when HTTP_REQUEST {
        set fInactive 0
        if {[string tolower [HTTP::path]] eq "/vdesk/hangup.php3} {
            set fInactive 1
        }
    }
    when HTTP_RESPONSE {
        HTTP::header insert Set-Cookie "mycookie=xx; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; HttpOnly"
    }
    

    However why don't you try setting the cookie expiry to 20mins? The Expires attribute will be updated each time you access the site - it will act as a parallel inactivity timer.