[Catalyst] Lighttpd Proxy Support
Bill Moseley
moseley at hank.org
Tue Oct 10 18:02:10 CEST 2006
On Mon, Oct 09, 2006 at 06:23:19PM -0400, Adam Herzog wrote:
> Index: lib/Catalyst/Engine/CGI.pm
> ===================================================================
> --- lib/Catalyst/Engine/CGI.pm (revision 5057)
> +++ lib/Catalyst/Engine/CGI.pm (working copy)
> @@ -128,9 +128,10 @@
> last PROXY_CHECK if $host !~ /localhost|127.0.0.1/;
> last PROXY_CHECK if $c->config->{ignore_frontend_proxy};
> }
> - last PROXY_CHECK unless $ENV{HTTP_X_FORWARDED_HOST};
> + last PROXY_CHECK
> + unless $ENV{HTTP_X_FORWARDED_HOST} || $ENV{HTTP_X_HOST};
> - $host = $ENV{HTTP_X_FORWARDED_HOST};
> + $host = $ENV{HTTP_X_FORWARDED_HOST} || $ENV{HTTP_X_HOST};
> # backend could be on any port, so
> # assume frontend is on the default port
Sure seems like this should be in Catalyst::Engine (or maybe
C::Engine::Apache and similar engines need to inherit from the CGI engine).
Otherwise that code needs to be duplicated in the other engines.
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list