Re: [squid-users] FW: X_FORWARDED_PROTO Support?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 14 Aug 2010 16:58:21 +1200

Visser, Peter (ZGM) wrote:
> Thanks for your reply.
>
> So is it possible to have Squid send a 302 redirect back to the client, replacing the http with https, instead of the webserver, but only for certain URL/Website? Other sites should remain HTTP.
>

Yes. The deny_info directive will take a URL and redirect with a 302 to
that URL when the ACL its assigned to blocks someone.

Squid 3.2 permits templating in one step like so:

   acl bounce proto HTTP
   http_access deny bounce
   deny_info https://%H%u bounce

For older releases which only provide passing the full original URL (%s)
to a bounce handler. The handler needs to do a second bounce only
altering the http/https protocol piece. Like so:

   acl bounce proto HTTP
   http_access deny bounce
   deny_info https://example.com/bounce?%s bounce

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.6
   Beta testers wanted for 3.2.0.1
Received on Sat Aug 14 2010 - 04:58:29 MDT

This archive was generated by hypermail 2.2.0 : Sat Aug 14 2010 - 12:00:02 MDT