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@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users