WS fixed audit origin address

This commit is contained in:
fbsanchez 2019-10-24 12:18:49 +02:00
parent 045d42d2bb
commit a0c610d988
1 changed files with 5 additions and 0 deletions

View File

@ -277,6 +277,11 @@ class WSManager extends WebSocketServer
$user->headers['cookie']
);
// If being redirected from proxy.
if (isset($user->headers['x-forwarded-for']) === true) {
$user->address = $user->headers['x-forwarded-for'];
}
$user->account = new User(['phpsessionid' => $php_session_id]);
$_SERVER['REMOTE_ADDR'] = $user->address;