Forum Discussion
Abed_AL-R
Cirrostratus
Feb 03, 2019ICAP based on file type
Hi
I'm trying to implemet ICAP based on file types. Only certain file types allowed to be forwarded to ICAP server.
I tried to implemet this iRule:
when HTTP_REQUEST {
if {([HTTP::method] eq "...
Abed_AL-R
Cirrostratus
Feb 03, 2019ok .. so I customized the irule to do the following:
when HTTP_REQUEST {
if {([HTTP::method] eq "POST") and [string tolower [HTTP::host]] eq "blabla.com" and [HTTP::header exists "Content-Disposition"] } {
switch -glob [HTTP::header value "Content-Disposition"] {
"*filename=*.doc*" -
"*filename=*.pdf*" -
"*filename=*.docx*" -
"*filename=*.xlx*" -
"*filename=*.xlxs*" {
log local0. "Requested uri: [HTTP::uri] from IP: [IP::local_addr] forwarded to ICAP"
ADAPT::enable request enable
}
default {
log local0. "Requested uri: [HTTP::uri] from IP: [IP::local_addr] redirected to blockpage"
HTTP::redirect http://blabla.com/virus.html
}
}
}
}
Still is not working
I don't see in the f12 tool the Content-Disposition header ..
Should I see that header there ? or the maybe web application is not including the Content-Disposition header ?
What I'm missing here ? ..
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects