You might need to inspect the request in more detail. Cloudflare might be forwarding you the original client IP under an additional CF-.... header
https://developers.cloudflare.com/fundamentals/get-started/reference/http-request-headers/
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I have a basic laravel setup with Fortify and Jetstream, all works like a charm, but when I put it up for hosting it's behind cloudflare, so on the profile page, it is showing the ip address of cloudflare for the open sessions, not the actual ip address of the user.
I can replace the current ip, to take the one behind cloudflare, but how do I update this (responsibly) in the session info that JetStream provides, so it reflects back correctly on the profile page?
I've tried to search for this, but the only answer was to use TrustedProxies (which I use, to get it to work behind cloudflare), but it doesn't explain how to handle the IP address bit.
Any help is appriciated. Cheers, Marc
have you seen this page https://developers.cloudflare.com/support/troubleshooting/restoring-visitor-ips/restoring-original-visitor-ips/#JUxJSMn3Ht5c5yq
It talks about restoring REMOTE_ADDR using server script
I nosing around, I also found mention of unwanted side effect of all requests coming from a single IP - it messes up throttling middleware so fixing this issue is probably more important for this than for the profile page.
Please or to participate in this conversation.