Forum Discussion
arpydays
Nimbostratus
Jul 09, 2015Passing variables between VSs for an ICAP enabled request.
Hi,
we have a LTM ICAP setup, which uses 2 VSs to handle a request, the HTTP VS and the ICAP internal VS. I'd like to capture information in the ICAP Response headers via a rule on the ICAP VS a...
Andras_Kis-Szab
Nimbostratus
Feb 22, 2016My ICAP-VS iRule with some debug options (ICAP and internal HTTP)
when ICAP_RESPONSE {
log local0. "ICAP [HTTP::header value ICAP_UID] ==> [ICAP::status]"
if { not ( [ICAP::status] == 200 ) } {
foreach aHeader [ICAP::header names] {
log local0. "ICAP [HTTP::header value ICAP_UID] $aHeader: [ICAP::header value $aHeader]"
}
foreach aHeader [HTTP::header names] {
log local0. "ICAP [HTTP::header value ICAP_UID] HTTP $aHeader: [HTTP::header value $aHeader]"
}
}
if { [ICAP::header exists X-Violations-Found] } {
HTTP::header insert ICAP_VIO [ICAP::header value X-Violations-Found]
} else {
HTTP::header insert ICAP_VIO "No violations"
}
if { [ICAP::header exists X-Infection-Found] } {
HTTP::header insert ICAP_INF [ICAP::header value X-Infection-Found]
} else {
HTTP::header insert ICAP_INF "Not infected"
}
}My VS-SIDE iRule snipp:
set x []
set y []
set z []
set w []
lappend y "description" "Virus found"
lappend z "code" [HTTP::header value ICAP_VIO]
lappend w "details" [HTTP::header value ICAP_INF]
lappend x $y $z $w
log local0. "$LogString ICAP $uid AV_BLOCK $x"HTH
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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