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