Skip to content

Commit

Permalink
Merge pull request #1367 from haarg/revproxy-proto-order
Browse files Browse the repository at this point in the history
perfer X-Forwarded-Proto to prevent users lying
  • Loading branch information
bigpresh authored Aug 14, 2017
2 parents 06b6c9b + 03d89b4 commit b9f3709
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Dancer2/Core/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ sub forwarded_host { shift->env->{'HTTP_X_FORWARDED_HOST'} }

# there are two options
sub forwarded_protocol {
$_[0]->env->{'HTTP_X_FORWARDED_PROTOCOL'} ||
$_[0]->env->{'HTTP_X_FORWARDED_PROTO'} ||
$_[0]->env->{'HTTP_X_FORWARDED_PROTOCOL'} ||
$_[0]->env->{'HTTP_FORWARDED_PROTO'}
}

Expand Down

0 comments on commit b9f3709

Please sign in to comment.