Forum Discussion

Ian_38374's avatar
Ian_38374
Icon for Nimbostratus rankNimbostratus
Mar 04, 2012

APM Logout iRule

I get an error when trying to put in a Logout URI of "/?cmd=logout" that says "Configuration error: Configured URI (/?cmd=logout) is not allowed to contain query parameter". Support gave me the following guidance.

 

 

 

pseudo code

 

when ACCESS_ACL_ALLOWED

 

if URI is "/index.php?module=Users&action=Logout" OR "/?cmd=logout'

 

then

 

ACCESS::SESSION remove

 

Redirect 302 to /my.policy

 

end pseudo code

 

 

Our iRules documentation can be found on https://devcentral.f5.com/wiki/iRules.APM.ashx and you can post any questions on the discussion boards there. They are usually answered pretty quickly. Alternatively, you can have an iRule written for you by our experts:

 

 

http://www.f5.com/services/professi...emand.html

 

 

 

As this seems to be a bug, I do not want pay for a work around using the irules on demand service.

 

I have tried many different variants of this, but I cannot seem to get it working.

 

 

when ACCESS_ACL_ALLOWED {

 

if { [HTTP::uri] equals "/?cmd=logout" } {

 

ACCESS::SESSION remove

 

HTTP::redirect "https://[HTTP::host]"

 

}

 

}

 

 

 

The errors I am seeing make it seem like ACCESS:SESSION does not even work with ACCESS_ACL_ALLOWED.

 

Could anyone offer any guidance on how to get this working?

 

 

 

Thank you

 

 

 

 

 

 

 

 

3 Replies

  • Hi Ian,

    Can you try this:

    
    when ACCESS_ACL_ALLOWED {
    
    if { [HTTP::uri] equals "/?cmd=logout" } {
    
    ACCESS::session remove
    HTTP::redirect "https://[HTTP::host]"
    }
    }
    

    Aaron
  • It was the capitalization of ACCESS::session (instead of ACCESS::SESSION). iRule commands have the namespace capitalized and the command in lowercase.

     

     

    Aaron