middlewares/client-ip
A Laravel middleware for reliably resolving the client's real IP address, including requests passing through proxies, load balancers, and CDNs. Supports forwarded headers and configurable trusted proxies for accurate IP detection.
$request->ip() with TrustProxies, or build a small internal middleware.X-Forwarded-For behavior, add tests around spoofing and CDN paths, and wrap it behind an internal request-context abstraction so Laravel-native $request->ip() or another implementation can replace it cheaply.How can I help you explore Laravel packages today?