Redirect client to diffrent locations based on ICAP Response Header Within ASM

Hi all,

we have some need to redirect users to different http locations, based on the ICAP response header value with ASM, for example if ICAP response header value contains “passArchive” i would like to redirect client to a some url that notify the user that the file that has been upload was password protected and for that reason it was blocked.

some ideas?

You can most likely do this with the LTM icap option with an associated irule.

ICAP_RESPONSE

This event is raised after an ICAP response has been processed but before the result is sent back to the HTTP adaptation virtual server. This provides an opportunity to modify the result or the resultant HTTP payload.

The ICAP::header command sets or returns ICAP attributes in the ICAP header

With that you should be able to do what you’re looking for, although to raise an ASM violation, you would also have to use:

ASM::raise

Issues a user-defined violation on the present request. The violation is added to other possible violations, either raised by the ASM or by previous invocations of this command.