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

6 Replies

  • You mean an actual web page that is empty?

    
    when HTTP_REQUEST {
        if { [string tolower [HTTP::uri]] starts_with "/foo" } {
            HTTP::respond 200 content ""
        }
    }
    

  • Sure.

     

     

    The first line is the event declaration. You want this code to fire when a client makes an HTTP request, so you'll wrap it in the HTTP_REQUEST event.

     

     

    The next line is the conditional argument. What you're essentially saying is, if the lowercase version of the request URI (the part AFTER the host name) starts with "/foo" (an arbitrary example), perform the following process. The actual URI will be dependent on your environment (what you want to trigger on).

     

     

    Finally, the HTTP::respond command allows you to preempt the server response, if there was one, and send your own response to the client instead. In this case we're going to send a 200 message (HTTP status code for "OK"), and some arbitrary content, in this case absolutely nothing "". You could literally send anything you wanted with this command - an HTML page, an image or file, JavaScript, css, anything.

     

     

  • Kevin, it turns out this Irule suits the best for the request I had:

     

    when HTTP_REQUEST {

     

    if {([HTTP::uri] eq "/") } { HTTP::respond 200 content "" }

     

    }

     

    I was able to apply this irule to the http vip and test it with now problem. Now how can I twik this irule to work on the https vips?

     

     

  • The implementation is exactly the same if you're terminating the client side SSL at the VIP (client SSL profile).