-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split IP resolution from update_tracked_fields
This permits users to easily customize where the ip address should be resolved. When fronting the application with a webserver or load balancer, the ip address may be the server and not be the user. E.g. consider the IP address is passed as the header: "X-Forwarded-For". ```ruby class User devise :trackable protected def extract_ip_from(request) request.headers["X-Forwarded-For"] end end ```
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
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