[Catalyst] Setting $c->req->{base}

Wade.Stuart at fallon.com Wade.Stuart at fallon.com
Tue Sep 20 16:53:36 CEST 2005







>
> Well right now I'm really just concerned with getting the correct
> hostname in base instead of http://localhost/ or http://127.0.0.1/.  And
> it turns out HTTPS cannot be auto-detected so you'll have to use
> something like SetEnv HTTPS on in a second VirtualHost on the backend.
>

      What I have ended up doing before Cat is setting up a sub that has an
array of regex to base mappers (read a dispatcher). This let me special
case urls that were force HTTPS and also sub portions of apps being served
from different lightweight web farms/proxies.  I have never found an
acceptable way to push out that HTTPS was being used on the frontend proxy,
and have always had to fall back to url based forced https.  I have even
experimented with mod ifying the proxy servers to push in more info in
header objects about the original request, but this is messy and makes
quickly updating proxy servers because of security updates a hassle -- not
to mention it is impossible if you are behind a commercial proxy.





> > I've sent you earlier today a patch that handles this and it's
currently
> > working fine on my server.
> >
>
> I think the begin method is much simpler than using $c->config->{base}
> as in your patch.
>
> -Andy
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst




More information about the Catalyst mailing list