Alternative method for using with Cloudflare + nginx?
-
Hi guys,
Just wondering if I can use this code snippet in my wp config file to get the plugin working with cloudflare (instead of using WP_FAIL2BAN_PROXIES)?
//restore original visitor IP if from Cloudflare if ( isset( $_SERVER[‘HTTP_CF_CONNECTING_IP’] ) ){ $_SERVER[‘REMOTE_ADDR’] = $_SERVER[‘HTTP_CF_CONNECTING_IP’]; }I would be using this in conjunction with nginx’s set_real_ip combined with real_ip_header CF-Connecting-IP as per the instructions here: https://www.wpintense.com/2017/03/24/configuring-nginx-pass-real-ip-addresses-cloudflare-compatible-fail2ban-wordpress/
And if this will work, would there be any performance or other downsides to this approach compared to using WP_FAIL2BAN_PROXIES?
Thanks!
The topic ‘Alternative method for using with Cloudflare + nginx?’ is closed to new replies.