[dancer-users] Behind proxy sometimes
sawyer x
xsawyerx at gmail.com
Mon May 26 12:10:28 BST 2014
Thank you, Matthew, for the patch.
Will it be possible to raise a pull request from this? It will help us
track this more, and keep you updated on the status, and to be able to
provide us with more input while working on it.
On Wed, May 14, 2014 at 11:27 PM, Matthew Mallard <mqm at q-technologies.com.au
> wrote:
> Hi,
>
> Long story, but I’m using a config where I’m connecting to the Plackup
> instance through an SSH tunnel. The users I’m developing for will connect
> through an Apache reverse proxy to the same environment. Anyhow, the
> behind_proxy setting was causing my SSH tunnel session to barf on splitting
> an uninitialised variable. This fixes it - should be harmless to put in
> for everyone, but a bit safer for the fringe cases:
>
> --- /perf/perl/lib/perl5/Dancer2/Core/Request.pm 2014-05-12
> 14:23:07.000000000 +1000
> +++ /perf/perl/lib/perl5/Dancer2/Core/Request.pm.bak 2014-05-12 14:26:28.
> 049744396 +1000
> @@ -222,7 +222,7 @@
> sub host {
> my ($self) = @_;
>
> - if ( $self->is_behind_proxy && $self->env->{HTTP_X_FORWARDED_HOST} ) {
> + if ( $self->is_behind_proxy ) {
> my @hosts = split /\s*,\s*/, $self->env->{HTTP_X_FORWARDED_HOST},
> 2;
> return $hosts[0];
> } else {
>
>
> *Regards,*
> *Matt*
>
>
>
>
>
>
>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20140526/e868f03f/attachment-0001.html>
More information about the dancer-users
mailing list