=head1 NAME
Mojolicious::Plugin::RemoteAddr - an easy way of getting remote ip address
=head1 SYNOPSIS
# Mojolicious
$self->plugin('RemoteAddr');
# In controller
my $ip = $self->remote_addr;
=head1 DESCRIPTION
L<Mojolicious::Plugin::RemoteAddr> adds simple helper "remote_addr" which returns an ip address of a remote host, It tries getting remote ip in different ways.
Firstly, it takes 'X-Real-IP' header. If it is empty it takes the ip from current request transaction.
=head1 CONFIG
=head2 order
Lookup order. Default is ['x-real-ip', 'tx']
Supported places:
=over 4
=item 'x-real-ip'
'X-Real-IP' request header
=item 'tx'
current request transaction
=back
=head1 HELPERS
=head2 remote_addr
Returns remote IP address
=head1 AUTHOR
Viktor Turskyi <
[email protected]>
=head1 BUGS
Please report any bugs or feature requests to Github L<
https://github.com/koorchik/Mojolicious-Plugin-RemoteAddr>
=head1 SEE ALSO
L<Mojolicious>, L<Mojolicious::Guides>, L<
http://mojolicio.us>.
=cut