Forum Discussion

PK_294685's avatar
PK_294685
Icon for Nimbostratus rankNimbostratus
Apr 07, 2017

Enable Request Adapt for Specific uri's

Hello Folks,

 

I'm having trouble configuring a Request Adapt profile for a specific uri's.

 

Here is the scenario:

 

I have a VIP that redirects different uri's to different Pools.

 

One of the uri (https://example.com/doc/upload) needs a Antivirus scanning required. I'm using ICAP for this.

 

I went through some documentation on F5 support & created ICAP & Request Adapt profiles for this and when I apply request adapt profile to the standard VIP, its breaking all other uri redirections & giving a reset.

 

I think because the requests are going to ICAP Internal Server instead to a actual pool.

 

So How would I allow only specific uri's go through Request Adapt profile for AV scanning. I have an iRule that uses HTTP_Request Event as well as ACL_ALLOWED event to match uri's & selecting the pools.

 

Any help is much appreciated. Thanks in advance!

 

1 Reply

  • You need an iRule which only enables the Request Adaptation when the URI matches the URI of file upload and disables it for all other URI otherwise all requests are going to go though ICAP, perhaps something like this:

    when HTTP_REQUEST {
     if {([HTTP::method] eq "POST") && ([HTTP::uri] starts_with "/doc/upload/") } {
        ADAPT::enable true
     } else {
        ADAPT::enable false
     }
    }