[squid-users] Custom User Agent Per ACL
Amos Jeffries
squid3 at treenet.co.nz
Thu Oct 27 22:43:04 UTC 2016
On 28/10/2016 6:48 a.m., jarrett+squid-users wrote:
> Is it possible to have a custom "request_header_replace User-Agent" assigned to mapped acl/listening port/tcp_outgoing_address?
>
> Examples:
> acl ipv4-1 myportname 3128 src xxx.xxx.xxx.xxx/24http_access allow ipv4-1 -> request_header_replace User Agent "Firefox xxxxx" ipv4-1 -> tcp_outgoing_address xxx.xxx.xxx.xxx ipv4-1
> acl ipv4-2 myportname 3129 src xxx.xxx.xxx.xxx/24 -> http_access allow ipv4-2 -> request_header_replace User Agent "Internet Explorer xxxxx" ipv4-2 -> tcp_outgoing_address xxx.xxx.xxx.xxx ipv4-2
>
That depends on your Squid version.
Replacement is a simple replacement of all headers with a (single) new
value.
What you are looking for is request_header_add. Though don't forget to
use "request_header_access deny" to remove the old versions of headers
(if any).
Amos
More information about the squid-users
mailing list