Ok, thanks, I do not see this point. In this cas this code must be acceptable ? my $ip; if ( request->remote_address() eq "127.0.0.1" ) { my @list_ip = split(",", request->header('x-forwarded-for') ); $ip = $list_ip[0]; } else { $ip = request->remote_address(); } bye Hugues Le 22/04/2015 18:34, Yitzchak Scott-Thoennes a écrit :
On Wed, Apr 22, 2015 at 4:01 AM, Hugues <hugues@max4mail.com> wrote:
if ( request->remote_address() eq "127.0.0.1" ) { $ip = request->header('x-forwarded-for'); } else { $ip = request->remote_address(); }
debug "My ip : ". $ip;
it's ok now
[110804] debug @0.260742> [hit #34]My ip : 192.168.0.19 in /home/git/
No, if the request to your apache already had an x-forwarded-for, you will have multiple comma-separated ips.
I try with and without
behind_proxy: true
I don't see difference Looks from the doc like that does something different.
dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users