mirror of
https://gitee.com/y_project/RuoYi-Vue.git
synced 2025-12-24 06:16:40 +08:00
fix: 修正 UserAgent 解析逻辑,正确设置浏览器和操作系统字段
This commit is contained in:
@ -165,8 +165,8 @@ public class TokenService
|
|||||||
String ip = IpUtils.getIpAddr();
|
String ip = IpUtils.getIpAddr();
|
||||||
loginUser.setIpaddr(ip);
|
loginUser.setIpaddr(ip);
|
||||||
loginUser.setLoginLocation(AddressUtils.getRealAddressByIP(ip));
|
loginUser.setLoginLocation(AddressUtils.getRealAddressByIP(ip));
|
||||||
loginUser.setBrowser(UserAgentUtils.getOperatingSystem(userAgent));
|
loginUser.setBrowser(UserAgentUtils.getBrowser(userAgent));
|
||||||
loginUser.setOs(UserAgentUtils.getBrowser(userAgent));
|
loginUser.setOs(UserAgentUtils.getOperatingSystem(userAgent));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user