Skip to content

Commit b9f3709

Browse files
authored
Merge pull request #1367 from haarg/revproxy-proto-order
perfer X-Forwarded-Proto to prevent users lying
2 parents 06b6c9b + 03d89b4 commit b9f3709

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Dancer2/Core/Request.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ sub forwarded_host { shift->env->{'HTTP_X_FORWARDED_HOST'} }
167167

168168
# there are two options
169169
sub forwarded_protocol {
170-
$_[0]->env->{'HTTP_X_FORWARDED_PROTOCOL'} ||
171170
$_[0]->env->{'HTTP_X_FORWARDED_PROTO'} ||
171+
$_[0]->env->{'HTTP_X_FORWARDED_PROTOCOL'} ||
172172
$_[0]->env->{'HTTP_FORWARDED_PROTO'}
173173
}
174174

0 commit comments

Comments
 (0)