I have a redirector enabled in my Squid config file as follows:

url_rewrite_program /etc/squid/redirector.php

I need to access the original HTTP request headers from within the redirector. I'm not interested in making any changes to the request headers; I only need to be able to read them.

As far as I can tell, Squid only passes the URL to the redirector, but not the request headers. So how can I access these request headers in my redirector?

Update 1: A related side question, is it possible to access POST data within a Squid redirector? I imagine that if this is possible, the mechanism for doing so would be the same as accessing the headers.

Update 2: I believe this is possible using ICAP. I'm looking for a solution that does not involve ICAP.


Short answer: it isn't possible.

Long answer: it isn't possible; make use of an ICAP server instead which allows modification of request headers as per the Squid FAQ.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.