0

I found a post on here where someone asked how to get the IP address of the client. Then someone mentioned that the request's ip() method will return the Load Balancer's IP if it exists: https://stackoverflow.com/a/41769505/17746636

Is this still relevant? Or it's been fixed already, and I will actually get the real client IP and no need for the workaround that he implemented in his answer/

Thanks

pileup
  • 1
  • 2
  • 18
  • 45
  • 3
    The highly upvoted answer there is **wrong**. All you need to do is properly configure Laravel to trust the load balancer. https://laravel.com/docs/10.x/requests#configuring-trusted-proxies – ceejayoz Jul 06 '23 at 14:10

0 Answers0