Right on. I was scratching my head over that one too! Took me hours to figure it out.
Unfortunately, there are still a lot of mysteries with using Vapor. So little resources out there, but I do love it.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
This drove me crazy for a while so figured I would make a post about. If this post will save someone else some time then great!
When deploying Vapor, your app is behind proxy servers. So REMOTE_ADDR will always be a proxy address.
use $request->header('x-vapor-source-ip') instead of $request->ip() ...
for my local dev I did this to get around x-vapor-source-ip not available locally.
$ipTranker->ip_address = $request->header('x-vapor-source-ip') ? $request->header('x-vapor-source-ip') : $request->ip();
Seems to work just great for me... back to work now... lol
Please or to participate in this conversation.