Commit e5f1cfb5 authored by Hans Pagel's avatar Hans Pagel Committed by Thomas Löffler

retrieve IP from proxies

parent bde85c83
......@@ -555,6 +555,14 @@ class LanguageDetection extends AbstractPlugin
*/
protected function getUserIP():string
{
if ($ip = GeneralUtility::getIndpEnv('HTTP_CLIENT_IP')) {
return $ip;
}
if ($ip = GeneralUtility::getIndpEnv('HTTP_X_FORWARDED_FOR')) {
return $ip;
}
return GeneralUtility::getIndpEnv('REMOTE_ADDR');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment