Forum Discussion
sharang_201287
Nov 11, 2016Historic F5 Account
I guess this is by design. The APM terminates old session in favor of new session. Try this irule to keep the old session intact;
apm_dont_logout_if_new_tab Tested in v11.4.0 If you hit APM logon page with another already-logged-in browser tab or window open, your old APM session is destroyed, in favor of the new one. This workaround irule looks up the existing session and will return an error page instead. This functionality is different than other typical Web applications, where a log-in is required to destroy the old session. APM sets the session cookie immediately upon hitting the login page, in order to allow a more flexible approach to the programmability of the login process.when RULE_INIT { mode 1 = display error page on user browser if logged on user is already active mode 2 = redirect the user to their current landing URI (full webtop, etc)
Set mode here \/set static::mode 2
}
when HTTP_REQUEST { if { ([HTTP::uri] == "/") && [HTTP::cookie exists MRHSession ] && [ACCESS::session exists] } { HTTP::close
switch $static::mode {
1 {
HTTP::respond 200 content "Please close
this browser window or exit your current remote access session before visiting
the login page.
Or, "
}
2 {
set starturi [ACCESS::session data get "session.policy.result.start_uri"]
log local0. "redirecting to starturi: $starturi"
HTTP::respond 302 Location "$starturi"
}
default {
return
}
}
return
} }
Heading