Forum Discussion
Remove new session link on logout page
Hi Alex,
below is the JScript which needs to be insert into your APM logout page(s)...
The snippet needs to be placed somewhere in the HTML-Header (e.g. right before code tags). It will execute a JScript which checks if the browser session includes the cookie CSS_newSessionDIV_disable=true. If the cookie is found it will trigger a custom CSS code to disable the content related to newSessionDIV If the cookie if not found the content gots displayed as usuall...
I've used the iRule below to develop the PoC. It can be used to set/remove the 'CSS_newSessionDIV_disable=true' cookie for demo purposes as an overlay of your APM enabled VS. You will finally need to develop a tailordered mechanism for your setup, to inject the CSS_newSessionDIV_disable cookie based on the last accessed application. This can be done on the individual web applications or by using another iRule...
when HTTP_REQUEST {
Defining the HTML demo page...
set http_content {
Links to manage the CSS_newSessionDIV_disable cookie
|
Below is APMs HTML line. Can you see it?
To open a new session, please
}
Defining the Web Server..
switch -exact -- [HTTP::uri] {
"/cookie_set" {
HTTP::respond 302 Location "/cookie_page" "Set-Cookie" "CSS_newSessionDIV_disable=true; path=/"
}
"/cookie_remove" {
HTTP::respond 302 Location "/cookie_page" "Set-Cookie" "CSS_newSessionDIV_disable=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/"
}
"/cookie_page" {
HTTP::respond 200 content $http_content "Content-Type" "text/html"
}
}
}
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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