Re: [squid-users] Custom rules to analyze HTTP headers

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 16 Dec 2009 09:52:20 +1300

On Mon, 14 Dec 2009 23:22:16 -0300, Dererk <dererk_at_buenosaireslibre.org>
wrote:
> Amos Jeffries escribió:
>> On Mon, 14 Dec 2009 19:20:22 -0300, Dererk
<dererk_at_buenosaireslibre.org>
>> wrote:
>>
>>> Hi there!
>>>
>>> I'm requiring to create custom access rules for Squid so that I can
>>> analyze the HTTP headers looking for a internal forward flag in which
>>> the original IP of the request rests. This is because I'm using a CDN,
>>> and they bring it in a custom-defined HTTP header.
>>>
>>
>> You mean X-Forwarded-For: or that they have created some custom
>> alternative that re-writes all that functionality?
>>
>> If they have then acl type req_header is what you are looking for.
>> Otherwise the basic forwarded-for handling functionality is built into
>> Squid.
>>
> Helo Amos!
> Thanks for answering that soon!
>
> I'm afraid it's not the beloved X-Forwarded-For header. This CDN sets a
> few headers by their own, and their are completely custom.
>
> What I was looking for was a way to analyze the HTTP Headers coming from
> them and perform certain types of operations, like comparing them
> against a blacklist, add them into buckets, or stuff like that.
>
> Unfortunately I was not able to find the way to do it using
> url_rewrite_program, in case it does support it.
>

That is where the second paragraph I wrote comes in:

 acl cdnCustomHeader req_header ^Foo:.something

amos
Received on Tue Dec 15 2009 - 20:52:26 MST

This archive was generated by hypermail 2.2.0 : Wed Dec 30 2009 - 12:00:02 MST