forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore original remote_ip algorithm.
We incorrectly were using the first address, rather than the last one. Added config option for X_FORWARDED_FOR header We don't need to filter values from X_FORWARDED_FOR header. Client IP can be only first IP in list by specification and only last for ruby servers and Apache. We should return nil if it's proxy IP or invalid IP instead of client IP. Fixes rails#7979
- Loading branch information
1 parent
f63545c
commit cc8556e
Showing
7 changed files
with
165 additions
and
75 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
Oops, something went wrong.