Search squid archive

Re: request_header_replace User-Agent 'UA string' for certain URLs/domains/ACLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/09/19 10:28 am, Igor Rylov wrote:
> How to change User-Agent string only for certain ACLs, for example,
> If I set up an: acl acl_name dst some.url
> or: acl acl_name url_regex some\.url\/path
> or sources IPs: acl acl_name src 192.168.0.123
> 
> Then use the User-Agent replacement for the configured acl:
> 
> request_header_replace User-Agent User-Agent-String
> 
> I can only do as above, but how can I apply the request_header_replace
> to only work with a configured acl_name?


To use the *_header_replace directives you need to also have a matching
*_header_access deny line to prevent the original header(s) from being used.

Like so:

  request_header_access User-Agent deny acl_name

  request_header_replace User-Agent User-Agent-String


Amos
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux