[Catalyst] Catalyst Redirect to https

Bill Moseley moseley at hank.org
Thu Mar 25 22:03:39 GMT 2010


2010/3/25 Octavian Rasnita <orasnita at gmail.com>

>
> The back end servers don't know if the current request is an http or an
> https one and on each redirect, they do the redirection using the http
> scheme.
> (I have also set the configuration option using_frontend_proxy to true.)
>
>
> Also, because the back end servers receive only http requests,
> $c->req->secure is always equal to 0.
> I have read that I can set the HTTPS environment variable to "On" and I p=
ut
> the following line in the configuration file of the load balancer Apache
> server in the virtualhost that handles SSL requests:
>
> SetEnv HTTPS On
>

Does that header get to Catalyst?  Obviously, check that first.

I have this in  a "after 'prepare_headers'":

   $res->secure( 1 ) if lc( $req->header( 'Https' ) || '' ) eq 'on';

The load balancer sends all traffic to the same port.  The load balancer
sets that header for SSL traffic.

I used to send to two different ports and then detect SSL based on the port
number.  Same result either way.




-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100325/1cec2=
321/attachment.htm


More information about the Catalyst mailing list