RE: [squid-users] Squid Cache: Version 3.1.15 - Adding custom header

From: Kris Glynn <Kristen.Glynn_at_virginaustralia.com>
Date: Tue, 13 Sep 2011 05:05:32 +0000

Thank you.

If for instance there was a header to replace and it was an RFC defined header - would this work?

request_header_replace X-Sophos-WSA-ClientIP %SRC

Is %SRC a valid parameter ?

Regards

- Kris Glynn: (07) 3295 3987 - 0434602997

-----Original Message-----
From: Amos Jeffries [mailto:squid3_at_treenet.co.nz]
Sent: Tuesday, 13 September 2011 2:58 PM
To: squid-users_at_squid-cache.org
Subject: Re: [squid-users] Squid Cache: Version 3.1.15 - Adding custom header

On 13/09/11 15:44, Kris Glynn wrote:
> Hi,
>
> Can I add a custom header to outgoing http requests from squid. I have compiled with "--enable-http-violations"
>
> I've tried something like this below but it doesn't appear to work.
>
> request_header_replace X-Sophos-WSA-ClientIP %SRC

replace is actually *replace*. There must be a copy of the same header removed from the request in order to replace.

Additionally this is only possible in current Squid with registered headers (RFC defined). Unknown custom headers cannot be replaced like this. Sponsorship or patches welcome to enable this for unregistered headers.

>
> Can anyone suggest a way to achieve this ?
>

Client IP information is already provided by Squid in these common headers:
   X-Forwarded-For: [... ,] $(client-ip)
   X-Client-IP: $(client-ip)

Ensure forwarded_for is ON (the default) to receive them from your Squid.

Amos

--
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.15
   Beta testers wanted for 3.2.0.11
The content of this e-mail, including any attachments, is a confidential communication between Virgin Australia, Pacific Blue or a related entity (or the sender if this email is a private communication) and the intended addressee and is for the sole use of that intended addressee. If you are not the intended addressee, any use, interference with, disclosure or copying of this material is unauthorized and prohibited. If you have received this e-mail in error please contact the sender immediately and then delete the message and any attachment(s). There is no warranty that this email is error, virus or defect free. This email is also subject to copyright. No part of it should be reproduced, adapted or communicated without the written consent of the copyright owner. If this is a private communication it does not represent the views of Virgin Australia, Pacific Blue or their related entities. Please be aware that the contents of any emails sent to or from Virgin Australia, Pacific Blue or their related entities may be periodically monitored and reviewed. Virgin Australia, Pacific Blue and their related entities respect your privacy. Our privacy policy can be accessed from our website:
http://www.virginaustralia.com/
Received on Tue Sep 13 2011 - 05:05:43 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 13 2011 - 12:00:02 MDT