Amos Jeffries escribió: >>>> 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 > Hi Amos! Sorry for the delay. That's right, for that very special case, req_header would work just as you mention. But I was looking for something more similar to what url_rewrite_program does, so I can perform some kind of scripting for analyzing HTTP packages. Unfortunately, it appears to me that url_rewrite_program doesn't pass much information above from IP, URL and some other stuff :-( Greetings, Dererk -- BOFH excuse #115: your keyboard's space bar is generating spurious keycodes.
Attachment:
signature.asc
Description: OpenPGP digital signature