Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

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!

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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
 }
}
0
Comments on this Answer
Comment made 09-Apr-2017 by PK 681

Thank you Sam.
Let me give it a try & let you know the result soon..

0
Comment made 10-Apr-2017 by PK 681

Sam,
All my iRule redirects are under When ACCESS_ACL_ALLOWED event. ADAPT::enable will not work under this event.
What other options do i have to fix this.
Thanks in advance!

0