Answer the question
In order to leave comments, you need to log in
Laravel Bug in \Request::ip()? Why does it return server ip and not client ip?
Found a fat bug when transferring a site from one server to another.
Everywhere it is written that \Request::ip() should return the ip of the client, but this is not so. This came to light when moving to another server, as a result of which all places where there was a check for \Request::ip() stopped working correctly.
And in $_SERVER['HTTP_X_REAL_IP'] the real ip of the client is stored, but for some reason Lara cannot pull it up, but takes, as I understand it, the first $_SERVER['REMOTE_ADDR'] that comes across.
How could this happen in a world-class framework and what to do about it?
In each application to replace the implementation of this function?
Answer the question
In order to leave comments, you need to log in
You have a bug in reading the documentation: https://laravel.com/docs/5.8/requests#configuring-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question