Search squid archive

Re: squid-users Digest, Vol 70, Issue 27

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

 



On 22/06/20 1:24 am, Monika Avalur wrote:
> Hello Amos,
> 
> Thank you so much for your reply.
> 
> So my use case is, in my application I have a switch which when turned
> ON, reads the client IP address from the header I configured in the
> application (i.e. X-Forwarded-For in Squid) and based on it some rules
> are triggered.
> 

You do not have to configure anything to *send* the XFF header. That is
the default behaviour. Config is only needed to receive it from clients,
and to manipulate it.


> If the switch is turned off, it uses proxy IP and based on it some other
> set of rules are triggered.
> 
> I want to establish this scenario using Squid proxy. But not sure
> whether Squid is sending the header.

To see what HTTP headers Squid is sending you can configure
"debug_options 11,2" and look for "HTTP server REQUEST" in cache.log



You may want to look into the standard "Forwarded" header for a better
long-term solution. <https://tools.ietf.org/html/rfc7239>

Currently that will need a bit of configuration for Squid to send, but
easily done:
  request_header_add Forwarded "for=%>a" all


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