For some reason this is no longer working for me to report the right IP when using Cloudlare
add_filter( ‘gform_ip_address’, ‘filter_gform_ip_address’ );
function filter_gform_ip_address( ip ) {
return _SERVER[‘CF-Connecting-IP’];
}
Anyone else experienced same?
sacom
(Samuel Aguilera (Gravity Forms))
2
Without the add_filter line that function is just a function… Post your add_filter line to allow people checking your whole snippet.
Thanks, I edited the code snippet above to include the add_filter (copy-pasted too short, first time) just for reference.
I sorted the issue with replacing mod_cloudflare with mod_remoteip in my apache loaded modules. It works without the filter now.
1 Like
chrishajer
(Chris (Gravity Forms))
4
Thank you for the update.