Skip to content

Commit

Permalink
Merge pull request #691 from ipaponov/devel
Browse files Browse the repository at this point in the history
behind proxy an X-Forwarded-Host
  • Loading branch information
ambs committed Nov 10, 2011
2 parents 359a4d2 + 6adc491 commit c41f44b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Dancer/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sub host {
$_[0]->{host} = $_[1];
} else {
my $host;
$host = $_[0]->env->{X_FORWARDED_HOST} if setting('behind_proxy');
$host = ($_[0]->env->{X_FORWARDED_HOST} || $_[0]->env->{HTTP_X_FORWARDED_HOST}) if setting('behind_proxy');
$host || $_[0]->{host} || $_[0]->env->{HTTP_HOST};
}
}
Expand Down

0 comments on commit c41f44b

Please sign in to comment.