@ligonsker Does it works if you set:
protected $proxies = '*';
protected $headers = Request::HEADER_X_FORWARDED_ALL;
In your app/Http/Middleware/TrustProxies.php.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I found a post on Stack Overflow 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 IP if it exists: https://stackoverflow.com/a/41769505/17746636
And created a method that works around that.
Is this still relevant? Or it's been fixed already and I will actually get the real client IP?
Thanks
Please or to participate in this conversation.