forked from dj-stripe/dj-stripe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly retrieve originating client IP in more cases
The current implementation would have returned the IP of the client sending/forwarding the request to the Django server which would not be accurate whenever Django would be running behind a proxy which would almost be the case in production. Used the standard HTTP_X_FORWARDED_FOR header to figure out the actual IP of the originating client that initiated the request.
- Loading branch information
1 parent
51fe6ee
commit 8f76e12
Showing
2 changed files
with
82 additions
and
7 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