Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't trust Client-IP header unless behind a proxy
REMOTE_ADDR is a far safer place to get an client's IP over the header which is easily spoofed. If someone is trusting the proxy we'll prefer x-forwarded-for and fallback to client-ip should that not exist. Remove support for http_clientaddress as I can't find any record of it existing in either the php docs or http specs.
- Loading branch information
Showing
2 changed files
with
9 additions
and
18 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