[6.x] Update ip_address protector to use request()->ips()#14063
[6.x] Update ip_address protector to use request()->ips()#14063jasonvarga merged 3 commits intostatamic:6.xfrom
Conversation
|
Thank you for the PR. This should work behind a load balancer. Sounds like maybe you need to configure your trusted proxies setup: https://laravel.com/docs/12.x/requests#configuring-trusted-proxies I'm hesitant to accept your PR as it uses |
|
@jasonvarga we use GCP so have to trust all proxies (as per Laravel docs https://laravel.com/docs/12.x/requests#trusting-all-proxies). If you just call |
The IP Address protector does not work when hosted behind a load balancer, as it uses
request()->ip()rather thanrequest->ips(), so does not detect theX-Forwarded-Forheader.This PR looks at all the IP addresses available in the request.