Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Restore real IP CloudFlare - WordPress (add in wp-config.php)
if ( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) {
$http_x_headers = explode( ',', $_SERVER['HTTP_CF_CONNECTING_IP'] );
$_SERVER['REMOTE_ADDR'] = $http_x_headers[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.