I'm trying to write in support for X-Forwarded-For without hacking core functions. I've been trying to work with the frontend_saveComment event hook. It looks like eventData and addData come through with some information about the comment, but setting
doesn't override commentInfo. I'm not sure if this is possible? I don't really want to hack include/functions_comments.inc.php if I don't have to since it will make upgrades, etc harder.
if (getenv('HTTP_X_FORWARDED_FOR') != '') {
$_SERVER['REMOTE_ADDR'] = getenv('HTTP_X_FORWARDED_FOR');
}
then you shouldn't need to patch any code, because the proper IP you want is always contained in the right variable that everything accesses?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/