Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document fix for wp-config.php to correct IP address for sites not using mod_rpaf #36

Closed
cd34 opened this issue Jan 30, 2013 · 1 comment

Comments

@cd34
Copy link
Collaborator

cd34 commented Jan 30, 2013

$temp_ip = explode(',', isset($_SERVER['HTTP_X_FORWARDED_FOR'])
? $_SERVER['HTTP_X_FORWARDED_FOR'] :
(isset($_SERVER['HTTP_CLIENT_IP']) ?
$_SERVER['HTTP_CLIENT_IP'] : $_SERVER['REMOTE_ADDR']));
$remote_addr = trim($temp_ip[0]);
$_SERVER['REMOTE_ADDR'] = preg_replace('/[^0-9.:]/', '', $remote_addr );

cd34 pushed a commit to cd34/wp-varnish that referenced this issue Jan 31, 2013
@cd34
Copy link
Collaborator Author

cd34 commented Jan 31, 2013

Fixed in commit 0b894f0, will be merged shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant