For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

mahir's avatar
mahir
Icon for Altostratus rankAltostratus
Nov 26, 2017

APM control URI

I would like to create an irules that allows me to control at the first opening of a session that the URI starts with a string / ABCDE / and after it redesigns the flow to the pool.the problem when I run the irules the content of the page does not download completely

when ACCESS_POLICY_AGENT_EVENT {

        if { [ACCESS::policy agent_id] eq "CONTROL" } {


            set uri1 [ACCESS::session data get session.server.landinguri]



             get hash from URI 
            if { $uri1 starts_with "/HABCD/" } {
                ACCESS::session data set session.custom.control_hash 1
            } else {
                ACCESS::session data set session.custom.control_hash 0
            }
        }

}

1 Reply

  • Hi,

     

    there are 2 preferred solution :

     

    • use an irule in ACCESS_SESSION_STARTED event instead of ACCESS_POLICY_AGENT_EVENT.

       

      ACCESS_SESSION_STARTED is executed at the beginning of the session.

       

      Here is an example of how to filter on landinguri in this event.
    • configure a variable assign in VPE.

       

      Here are examples of how to write variable assign expressions.

    but the code you posted may not cause incomplete page.

     

    you can try this variable assign:

     

    session.custom.control_hash

     

    expr {[mcget {session.server.landinguri}] starts_with "/HABCD/"}