I think that contains a comma-separated list of IP addresses, whereas
the X-Real-IP header always contains just one address.
- Alex
On 07/12/2014 10:58 PM, Luc Didry wrote:
On 12/07/2014 21:46, Alexander Karelas wrote:
I know there's $self->tx->remote_address, but that retrieves the address
of the reverse proxy (127.0.0.1).
Because even though I have set up a X-Real-IP header and a
X-Forwarded-For header, neither of these headers get used by
$self->tx->remote_address.
What's the right way to retrieve the client's IP address?
In your case, that's $c->req->headers->header('X-Forwarded-For');
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.