[squid-users] Did request come via SSL?

From: Grant McLean <grant@dont-contact.us>
Date: Tue, 22 May 2007 10:02:50 +1200

Hi All

I'm setting up Squid for the first time, in accelerator mode in front of
an Apache/mod_perl app. Squid is listening on both port 80 (HTTP) and
port 443 (HTTPS). The basics (including SSL cert stuff) are working but
I've hit a bit of a road block.

Is there any way to tell that a particular request came in on the SSL
port?

There are some sections of our site that should only be accessed via SSL
and in general, the rest of the site should only be accessed via HTTP.
With Apache, I could achieve this using mod_rewrite to detect requests
that came in on the 'wrong' port and issue redirects for the same path
on the http or https url as appropriate.

Now that I have Squid in front of Apache, there doesn't appear to be
anything in any of the headers that tells me the request came over the
secure port. Is there some option I can enable to add a header?

It would be even better if I could achieve the redirect magic using a
squid redirector script, but once again, there doesn't seem to be
sufficient information passed to the redirector for it to know if the
request came over a secure channel.

Strangely, when I was playing around with this on Friday, I could have
sworn that the redirector script was receiving URLs that started with
'https', but I can't reproduce that today so I must have imagined it :-)

Does anyone have any suggestions.

Thanks
Grant
Received on Mon May 21 2007 - 16:02:56 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Jun 01 2007 - 12:00:05 MDT