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

LoveNoodles's avatar
LoveNoodles
Icon for Altocumulus rankAltocumulus
Oct 04, 2017

Check status of uri within irule

Hi, is it possible to check response status of a uri within an irule?

 

For example, I want to check status of "; and if response is not 200 then drop the connection.

 

2 Replies

  • P_K's avatar
    P_K
    Icon for Altostratus rankAltostratus

    May be you can try something like this..

     

    when HTTP_RESPONSE {

     

    if { [HTTP:uri] eq "/healthcheck" && [HTTP::status] == 200 } {

     

    HTTP::collect

     

    reject

     

    }

     

    }

     

    Check this Wiki page

     

  • Hi,

     

    Can you explain why you want to do it within an irule instead of configuring a monitor, which is the object for that.

     

    Of course you can do it with a sideband connection, but it is not recommended because it will add latency in request on which you enable it.