Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Client Ip Laravel Package

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.

Deep Wiki
Context7

Product Decisions This Supports

  • Security and audit logging: Capture a normalized client IP on each request for audit trails, authentication events, admin actions, and incident investigation.
  • Abuse prevention and rate limiting: Feed IP attributes into rate limiters, blocklists, fraud checks, and bot mitigation—provided proxy/trusted-header handling is correct.
  • Analytics and coarse segmentation: Support request-source reporting, regional usage analysis, and basic personalization signals, while recognizing IP alone is not reliable identity and carries privacy obligations.
  • Build vs. buy: Treat client-IP detection as commodity infrastructure. This MIT package can avoid custom middleware only if it fits the stack and its proxy/IP logic is trustworthy; otherwise use Laravel’s native $request->ip() with TrustProxies, or build a small internal middleware.
  • Roadmap prioritization: This is an enabler, not a differentiator. Fund it only when audit, security, compliance, or request tracing requirements are concrete.

When to Consider This Package

  • Consider it when the application already uses PSR-15 middleware and needs a small, standards-based way to attach client IP to the request for downstream logging or security logic.
  • Consider it for low-risk, replaceable plumbing where MIT licensing, a recent release, and a narrow responsibility are sufficient.
  • Evaluate carefully before adopting in Laravel-native projects: Laravel middleware is not PSR-15 by default, so integration may require a PSR-7/PSR-15 bridge or adapter.
  • Look elsewhere if you need maintained, high-assurance IP handling with documented trusted-proxy/CDN behavior, IPv6 edge cases, header-spoofing protection, geolocation, ASN, or compliance support.
  • Avoid making it a critical dependency given low adoption signals (16 stars, score 0.42) and an unknown repository. Prefer framework-native handling or a small internal abstraction unless the PSR-15 fit is strong.

How to Pitch It (Stakeholders)

  • Executives: This is a low-cost, MIT-licensed utility for standardizing client-IP capture in audit and security flows. It is not strategic and should not become a critical dependency; approve a small evaluation only if IP-based logging or abuse controls are on the roadmap.
  • Engineering: Use it only if the service is PSR-15-based or a bridge is acceptable. Verify trusted-proxy and 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.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log