Skip to content

Commit

Permalink
recognize proxy's HTTP_X_FORWARDED_PROTO
Browse files Browse the repository at this point in the history
Fixes #871
  • Loading branch information
yanick committed May 13, 2013
1 parent d16628b commit cc3cd10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -4,6 +4,7 @@ Revision history for Dancer
[ ENHANCEMENTS ]
* GH #919: 'dancer' script exits with code 255 if application
name is invalid. (ppisar)
* GH #871: now recognize HTTP_X_FORWARDED_PROTO. (mlbarrow)

[ DOCUMENTATION ]
* GH #922: Add example of request parameters. (Gabor Szabo)
Expand Down
1 change: 1 addition & 0 deletions lib/Dancer/Request.pm
Expand Up @@ -72,6 +72,7 @@ sub scheme {
if (setting('behind_proxy')) {
$scheme = $_[0]->env->{'X_FORWARDED_PROTOCOL'}
|| $_[0]->env->{'HTTP_X_FORWARDED_PROTOCOL'}
|| $_[0]->env->{'HTTP_X_FORWARDED_PROTO'}
|| $_[0]->env->{'HTTP_FORWARDED_PROTO'}
|| ""
}
Expand Down

0 comments on commit cc3cd10

Please sign in to comment.