Forum Discussion
ICAP concept
Hi
We have configured ICAP request adap on one of the virtual servers. and attached irule+URIs datagrup that is checking specific URIs related to files upload. And it is working fine.
My question, is it possible to forward to ICAP servers any POST request related to upload files without statically adding every time URIs to the data datagroup?
Will this cause a bad impact if we apply it this way:
when HTTP_REQUEST {
if {([HTTP::method] eq "POST")} {
ADAPT::enable true
} else {
ADAPT::enable false
}
}
- Andy_McGrath
Cumulonimbus
Simple answer is yes you can but I would try to limit it to only trigger when needed even if something like the following where you can only triggering base on the start and/or end of the URL path.
The following is a simplified iRule used for ICAP within using any data groups:
when HTTP_REQUEST { set lowerHttpPath [string tolower [HTTP::path]] if {($lowerHttpPath starts_with "/file") && ($lowerHttpPath ends_with "/upload") && ([HTTP::method] eq "POST")} { if {[active_members iCapPool] > 0} { ADAPT::enable request 1 } else { iCap Pool is down, do not allow for file upload, reset the connection reset return } } else { ADAPT::enable request 0 } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com