🌃调整水印获取IP的方法

This commit is contained in:
KaneLeung 2024-07-17 09:56:16 +08:00
parent 33c7f7c3bd
commit 578237571b

View File

@ -277,7 +277,7 @@ public class SysAuthService : IDynamicApiController, ITransient
// 获取水印文字(若系统水印为空则全局为空)
var watermarkText = await _sysConfigService.GetConfigValue<string>(ConfigConst.SysWebWatermark);
if (!string.IsNullOrWhiteSpace(watermarkText))
watermarkText += $"-{user.RealName}"; // $"-{user.RealName}-{_httpContextAccessor.HttpContext.GetRemoteIp()}-{DateTime.UtcNow}";
watermarkText += $"-{user.RealName}"; // $"-{user.RealName}-{_httpContextAccessor.HttpContext.GetRemoteIpAddressToIPv4(true)}-{DateTime.UtcNow}";
return new LoginUserOutput
{