Re: Clients Header User-Agent replace?

Foxy Lady <[email protected]>
Newsgroups gmane.comp.web.squid.general
Message-ID <lEAcD1s47B9BG564bS2-5-Ey4mkbE1xrPbc7XAT6mYRA0cRIAb-Dnw1GOEO1DWIlLmVywR7pg5mlEmBVnt93nssTRCOudfLwAhnBzUHNg0o=@proton.me>
Perfectly works.

While Squid logs the original UA, remote webserver receives the modified one,

x.x.x.x my.domain.com my.domain.com [TLSv1.3] - - [26/Feb/2025:10:58:41 +0100] "GET / HTTP/1.1" [301] 357 0 19 19361 "-" "Mozilla/5.0 (Personal-Test_DevOPS)"

Sorry for my old documentation!

Many thanks!!!


Inviato con l'email sicura Proton Mail.

mercoledì 26 febbraio 2025 06:43, Amos Jeffries <[email protected]> ha scritto:

> On 25/02/25 23:59, Foxy Lady wrote:
> 
> > Hi all.
> > Can't figure out how to remove original clients UA from calls.
> > Tried out something like,
> > 
> > #USER AGENT
> > header_access Allow allow all
> > header_access Authorization allow all
> > header_access Cache-Control allow all
> > header_access Content-Encoding allow all
> > header_access Content-Length allow all
> > header_access Content-Type allow all
> > header_access Date allow all
> > header_access Expires allow all
> > header_access Host allow all
> > header_access If-Modified-Since allow all
> > header_access Last-Modified allow all
> > header_access Location allow all
> > header_access Pragma allow all
> > header_access Accept allow all
> > header_access Accept-Enncoding allow all
> > header_access Accept-Language allow all
> > header_access Content-Language allow all
> > header_access Mime-Version allow all
> > header_access Cookie allow all
> > header_access Set_Cookie allow all
> > header_access Retry-After allow all
> > header_access Title allow all
> > header_access Connection allow all
> > header_access Proxy-Connection allow all
> 
> 
> 
> FYI, the directive "header_access" is deprecated, typos in the header
> names, and you don't have anything forbidden for these rules to re-allow.
> In short, those rules appear to be doing nothing.
> 
> > request_header_replace User-Agent Mozilla/5.0 (Personal-Test_DevOPS)
> > header_replace User-Agent Mozilla/5.0 (Personal-Test_DevOPS)
> 
> 
> You first have to prevent the clients header from being allowed, then
> provide the replacement. Like so;
> 
> 
> request_header_access User-Agent deny all
> request_header_replace User-Agent Mozilla/5.0 (Personal-Test_DevOPS)
> 
> 
> Cheers
> Amos
> _______________________________________________
> squid-users mailing list
> [email protected]
> https://lists.squid-cache.org/listinfo/squid-users
_______________________________________________
squid-users mailing list
[email protected]
https://lists.squid-cache.org/listinfo/squid-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.