i need an extension to fix showing incorrect IP addresses when server is behind reverse proxy.
We found out how to fix it with code edit, but it would be more usefull to have such option as an extension.
Pasting this piece of code
Code: Select all
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR'])
{
$_SERVER['REMOTE_ADDR'] = htmlspecialchars((string) $_SERVER['HTTP_X_FORWARDED_FOR']);
}
Code: Select all
if (!defined('IN_PHPBB'))
{
exit;
}
Can someone make this as an extension please?
There should be just some checkbox or switch in ACP like in invision forum (by default disabled).