Configuring Squid to Operate with Variables

Usage of the request_username and request_ip variables requires additional configuration of the Squid proxy server. For that purpose, adjust the squid.conf configuration file (typically /usr/local/squid/etc/squid.conf).

If the following lines are already present in the configuration file, you can uncomment them and adjust the values if necessary. Otherwise, add the lines at the end of the file.

To enable use of request_ip:

# request_ip
icap_send_client_ip on

To enable use of request_username:

# request_username
icap_send_client_username on
icap_client_username_header X-Client-Username
icap_client_username_encode off