Adding user defined headers to ICAP traffic

book

Article ID: 170441

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

You are sending traffic, via ICAP, to a DLP solution and want to added custom HTTP headers to differentiate HTTP and HTTPS traffic.

 

Environment

The following solution requires SGOS version 6.5.9.2 or higher

Resolution

 To achieve this you need to use the following CPL police which needs to go into the local policy on the proxy. Currently this can not be achieved via VPN.

#Setting Custom Headers
define action set_icap_header_HTTP
    set(icap_reqmod.request.x_header.CustomHeader,'HTTP_ID')
end

define action set_icap_header_HTTPS
    set(icap_reqmod.request.x_header.CustomHeader,,'HTTPS'_ID)
end

<proxy>
    client.protocol=http action.set_icap_header_HTTP(yes)
    client.protocol=https action.set_icap_header_HTTPS(yes)

Note: CustomHeader is a user defined field and HTTP_ID/HTTPS_ID are any values you wish to set in the header