Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fixed forwarded_for_address #767

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Split
View
@@ -50,7 +50,7 @@ sub new {
# aliases
sub agent { $_[0]->user_agent }
sub remote_address { $_[0]->address }
-sub forwarded_for_address { $_[0]->env->{'X_FORWARDED_FOR'} }
+sub forwarded_for_address { $_[0]->env->{'X_FORWARDED_FOR'} || $_[0]->env->{'HTTP_X_FORWARDED_FOR'} }
sub address { $_[0]->env->{REMOTE_ADDR} }
sub host {
if (@_==2) {