NAME
Mojolicious::Plugin::RemoteAddr - an easy way of getting remote ip address
SYNOPSIS
# Mojolicious
$self->plugin('RemoteAddr');
# In controller
my $ip = $self->remote_addr;
DESCRIPTION
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.
CONFIG
order
Lookup order. Default is ['x-real-ip', 'tx']
Supported places:
HELPERS
remote_addr
Returns remote IP address
AUTHOR
Viktor Turskyi <koorchik@cpan.org>
BUGS
Please report any bugs or feature requests to Github https://github.com/koorchik/Mojolicious-Plugin-RemoteAddr