ICAP with iRule Response Page without ASM
Hello,
We are running on Big IP 13.1.1.4 TMOS code and set up Content Adaptation for HTTP request to check files uploaded through one our Website using ICAP. It's working fine but in case any virus is detected the ICAP server modify the response and show it's own response.
But we would like to redirect the end-user to a dedicated and corporate web page of our website. I prepared the below Irule but it's now working.
when ADAPT_REQUEST_RESULT
{
if { ([ADAPT::result] contains "respond") } {
log local0. "ICAP Response is [ADAPT::result], let's customized reject page"
set response {
<html>
<head>
<title>Virus Detected</title>
<meta http-equiv="refresh" content="0;URL='https://int-www-01.citizensfla.com/virus-test'" />
</head>
</html>
}
HTTP::header remove Content-Length
#HTTP::payload replace 0 [HTTP::payload length] ""
HTTP::payload replace 0 0 $response
}
}
How we could redirect the POST of the user to a dedicated page within our website if a virus is found using ICAP internal VS.
Many thanks in advance for any help on this matter.
Regards
Vijay