Created
August 10, 2016 01:30
-
-
Save chaselivingston/ce0017a8b46435285c567a074d27747c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { | |
$forwarded_ips = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] ); | |
$_SERVER['REMOTE_ADDR'] = $forwarded_ips[0]; | |
unset( $forwarded_ips ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment