🍒 fix(logging): 修复获取请求Ip为空的问题
This commit is contained in:
parent
f656c244a9
commit
03e40b8614
@ -108,7 +108,7 @@ public class DatabaseLoggingWriter : IDatabaseLoggingWriter, IDisposable
|
||||
var remoteIPv4 = reqHeaders.GetValueOrDefault("X-Forwarded-For")?.ToString();
|
||||
|
||||
// 获取IP地理位置
|
||||
if (string.IsNullOrEmpty(remoteIPv4)) remoteIPv4 = reqHeaders.GetValueOrDefault("remoteIPv4")?.ToString();
|
||||
if (string.IsNullOrEmpty(remoteIPv4)) remoteIPv4 = loggingMonitor.RemoteIPv4;
|
||||
(string ipLocation, double? longitude, double? latitude) = CommonHelper.GetIpAddress(remoteIPv4);
|
||||
|
||||
// 获取设备信息
|
||||
|
||||
Loading…
Reference in New Issue
Block a user