feat(user): log http_x_forwarded_for in history
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-01-15 20:47:54 +08:00
parent d410dff7d8
commit 6e5c15c925
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -382,6 +382,7 @@ class UOJUser {
$extra = UOJUser::getExtra($user); $extra = UOJUser::getExtra($user);
$cur = [ $cur = [
'addr' => $info['remote_addr'], 'addr' => $info['remote_addr'],
'forwarded_addr' => $info['http_x_forwarded_for'],
'ua' => substr($info['http_user_agent'], 0, UOJUser::MAX_UA_LEN), 'ua' => substr($info['http_user_agent'], 0, UOJUser::MAX_UA_LEN),
'last' => UOJTime::$time_now_str 'last' => UOJTime::$time_now_str
]; ];