Forum Discussion
Daniel_Varela
Jul 03, 2012Employee
APM How to simulate user session log out
Hi everyone!
I'm trying to close a session using an irule. When the user access to "/logout.do" I would like to close the sessión but like if the user were logged out (not an admin termination). I'm using this irule:
when ACCESS_ACL_ALLOWED {
if { [HTTP::uri] equals "/logout.do" }{
ACCESS::session remove
HTTP::redirect "http://[HTTP::host]"
}
}
At the end I'm redirected to https://myhost/my.logout.php3?errorcode=20 so is a little confuse to the users.
Can any one let me know how to close the session in a clean way?
Than you in advance!
- MiLK_MaNNimbostratusTry this instead:
- Daniel_VarelaEmployeeHi milk_man,
- Eric_St__JohnEmployeeRemove the 'ACCESS::session remove' and use the redirect statement that MiLK_MaN mentioned. That should provide a normal user disconnection.
- Daniel_VarelaEmployeeHi guys!
- Walter_KacynskiCirrostratus
In an ACCESS_ACL_ALLOWED event you must use
ACCESS::respond 302 location [HTTP::host]
to avoid the ST_HTTP_PREPEND_HEADERS error.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects