[Catalyst] changing the port
Bill Moseley
moseley at hank.org
Sun Jan 14 16:26:06 GMT 2007
On Sun, Jan 14, 2007 at 11:28:54AM +0200, Octavian Rasnita wrote:
> x-forwarded-host
>
> I think I could get the port number from this request header, but in that
> case it would work only if I use the application with a proxy server.
That should work. Look at C::Engine::Apache:
http://dev.catalyst.perl.org/browser/trunk/Catalyst-Engine-Apache/lib/Catalyst/Engine/Apache.pm
$host = $c->request->header( 'X-Forwarded-Host' );
if ( $host =~ /^(.+):(\d+)$/ ) {
$host = $1;
$port = $2;
}
Maybe print out that headers on your back-end Catalyst and see what
the front end is sending to make sure the port is included.
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list