Forum Discussion
AngryCat_52750
Nimbostratus
Jan 16, 2014post back to an application
is there a way to post back a URL to a web application.. i have an irule that handles a logout event but i also need to post back to a secondary application to kill a session there. the secondary appliction is waiting for the following post back -
http://serverA:8080/SecondApp/logon/logoff.do
Current, logout irule -
if { [ string tolower [HTTP::uri]] equals "/firstapp/logout" } {
ACCESS::session remove
ACCESS::respond 302 Location "https://[HTTP::host]" "Set-Cookie" "MRHSession=0; expires=Tuesday, 29-Mar-1970 00:15:00 GMT" "Connection" "Close"
}
1 Reply
- IheartF5_45022
Nacreous
Try this (not tested but you should get the general idea;
when CLIENT_ACCEPTED { set fLogout 0 } when HTTP_REQUEST { if { [ string tolower [HTTP::uri]] equals "/firstapp/logout" } { if {$fLogout} { ACCESS::session remove ACCESS::respond 302 Location "https://[HTTP::host]" "Set-Cookie" "MRHSession=0; expires=Tuesday, 29-Mar-1970 00:15:00 GMT" "Connection" "Close" return } else { Save request details for use in HTTP_RESPONSE set $req [HTTP::request] set flag set fLogout 1 Execute second logout first 1.1.1.1 is address of serverA node 1.1.1.1 80 HTTP::uri "/SecondApp/logon/logoff.do" } } } when HTTP_RESPONSE { if {$fLogout} { Retry original request set fLogout 0 HTTP::retry $req } }
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