Re: [squid-users] Custom User Agent Per ACL

2016-10-27 Thread Amos Jeffries
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 x" 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 x" 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

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


[squid-users] Custom User Agent Per ACL

2016-10-27 Thread jarrett+squid-users
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 x" 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 x" ipv4-2 -> 
tcp_outgoing_address xxx.xxx.xxx.xxx ipv4-2

Thanks!

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users