[dancer-users] ip addess

Yitzchak Scott-Thoennes sthoenna at gmail.com
Wed Apr 22 17:34:01 BST 2015


On Wed, Apr 22, 2015 at 4:01 AM, Hugues <hugues at 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.


More information about the dancer-users mailing list