mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-08-07 09:22:46 +02:00
Small IP logging fix
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ sub startup {
|
||||
$self->helper(
|
||||
ip => sub {
|
||||
my $c = shift;
|
||||
my @ip = ($c->tx->remote_address eq '127.0.0.1') ? $c->tx->req->{content}->{headers}->{headers}->{'x-forwarded-for'}->[0]->[0] : ($c->tx->remote_address);
|
||||
my @ip = ($c->tx->remote_address eq '127.0.0.1' && $c->app->mode eq 'production') ? $c->tx->req->{content}->{headers}->{headers}->{'x-forwarded-for'}->[0]->[0] : ($c->tx->remote_address);
|
||||
return join(',', @ip);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user