!1127 fix: 修正 UserAgent 解析逻辑,正确设置浏览器和操作系统字段

Merge pull request !1127 from yeleiyun/fix-useragent-bug
main
若依 4 weeks ago committed by Gitee
commit 5e83011d56
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -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));
} }
/** /**

Loading…
Cancel
Save