-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
However, if you are in the situation where, say, you have a Content Distribution Network (like Amazon CloudFront) that passes to load balancer (like Amazon ELB) then you may end up with a chain of unknown proxies forwarding from one to another. In that case, '*' above would only match the final proxy (the load balancer in this case) which means that calling `$request->getClientIp()` would return the IP address of the next proxy in line (in this case one of the Content Distribution Network ips) rather than the original client IP.To always get the original client IP, you need to trust all the proxies in the route to your request. You can do this by setting proxies to ['0.0.0.0/0', '2000:0:0:0:0:0:0:0/3'] which means all IP addresses will be trusted. This patch implements ** as syntactic sugar for ['0.0.0.0/0', '2000:0:0:0:0:0:0:0/3']
- Loading branch information
Showing
4 changed files
with
175 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters