Forum Discussion

Scott_87636's avatar
Scott_87636
Icon for Nimbostratus rankNimbostratus
Feb 27, 2013

iRule for closing Browser Window after logoff.htm is detected

We are using APM for SSO and we have a couple of applications which the logoff page goes back to the login page and signs back in again. We are able to create an irule to redirect to a different webpage and that works but what we were looking for is something to instead redirect to another webpage to actually close its Browser Window all together.

 

4 Replies

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus
    Have you considered using JavaScript and/or jQuery?
  • I assume you want to close the browser window to clear a session cookie? If so, can't you just update the cookie and set it's expiry time to some time in the past to invalidate it.
  • No I just want the browser to close out. The reason behind it is we are using APM for SSO and when we launch the application from our intranet portal we have already established the Auth, so the application launches in a new browser and signs you in. So whne we hit logoff in the application I want that window to go away as right now we are redirecting it to another webpage to fix the login loop issue since the logoff goes back to the login page and signs it back in. Once that browser window goes away if they go to the intranet portal browser again they can launch these applications again and would not have to reauthenticate. I am looking into javascript call in an irule but that is new to me so I have to do some research.
  • OK, understood. Serving the javascript shouldn't be too hard. Here's an example, granted just HTML but it'll point you in the right direction;

    
    when HTTP_REQUEST {
     HTTP::respond 200 content [subst {
      
      Blocking Page
      
      You got blocked buddy. Try using a valid URI, not [HTTP::uri].
      
      
      } ]
    }
    
    subst allows variable expansion (in this case for [HTTP::uri]) when {} 
    brackets are used. It’s not necessary if you don’t use variables.