Per discussion on the catalyst list, this patch implements
handling for a bunch
of different X-Forwarded headers in a centralized spot, so
that all engines
benefit. I've also included patches for the Apache and SCGI
engines to remove
the proxy-related code they had implemented internally.
Engines that didn't implement any proxy handling will
magically get this
handling added when the user upgrades to a version of
Catalyst-Runtime with
this code in it, and I _think_ that old versions of the
engines should still
just work.
Here's a summary from the docs:
=over 4
=item * X-Forwarded-For
The IP address in C<< $c->req->address >>
is set to the user's real IP
address, as read from the X-Forwarded-For header.
=item * X-Forwarded-Host
The host value for C<< $c->req->base >>
and C<< $c->req->uri >> is set
to the real host, as read from the X-Forwarded-Host header.
The value
of C<< $c->req->hostname >> is also
adjusted accordingly.
=item * X-Forwarded-Port
The port value for C<< $c->req->base >>
and C<< $c->req->uri >> is set
to the real port, as read from the X-Forwarded-Port header.
=item * X-Forwarded-Path
If this is set, the value of the X-Forwarded-Path header is
I<prepended> to the path value of C<<
$c->req->base >> and C<<
$c->req->uri >>.
=item * X-Forwarded-Is-SSL
If this is set, the scheme value of C<<
$c->req->base >> and C<<
$c->req->uri >> is set to "https".
Additional, C<< $c->req->protocol
>> is also set to "https", and C<<
$c->req->secure >> is set to a true
value.
=back
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/
_______________________________________________
Catalyst-dev mailing list
Catalyst-dev lists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst-dev
|