cancel
Showing results for 
Search instead for 
Did you mean: 

iRule OWA logout 16.1 code

KevinIHA
Nimbostratus
Nimbostratus

Hello,

 

Does anyone have a working iRule for OWA logout on 16.1 code? I am having issues with any of my iRules on 16.1 with redirects and responses. Downgrading to 15 code is not an option right now.

 

Current Script:

when HTTP_REQUEST {

  set apm_cookie [HTTP::cookie value MRHSession]

 

if {[string tolower [HTTP::uri]] contains "logoff" } {

  log local0. "Webmail - logoff triggered"

    HTTP::respond 302 noserver "Location" "/vdesk/hangup.php3?hangup_error=1" "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate" Set-Cookie "MRHSession=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;domain=[HTTP::host];path=/" Set-Cookie "LastMRH_Session=deleted;expires=Thu, 01-Jan-1970 00:00:10 GMT;domain=[HTTP::host];path=/"

    log local0. "Webmail - Session removed"

  if { ([ACCESS::session exists -sid $apm_cookie]) } {

    ACCESS::session remove

    log local0. "Webmail - Access Session Removed"

    }

  }

}

 

I'm guessing this is a bug with 16.1 code as this works just fine on 15, but I would like to hear if I'm the only one.

 

Thank you

1 REPLY 1

KevinIHA
Nimbostratus
Nimbostratus

Seems iRules are super picky about the order they are in in 16 code. Moved the iRule to the bottom of the applied iRules and it fixed my issue.