Skip to content

Commit

Permalink
移除 yauaa 获取UA信息,采用hutoolUA工具类-UserAgentUtil 获取浏览器信息:elunez/eladmin-mp#5
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Jul 5, 2023
1 parent 189f671 commit 46731f2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public static String getCityInfo(String ip) {

public static String getBrowser(HttpServletRequest request) {
UserAgent ua = UserAgentUtil.parse(request.getHeader("User-Agent"));
return ua.getBrowser().toString() + " " + ua.getVersion();
String browser = ua.getBrowser().toString() + " " + ua.getVersion();
return browser.replace(".0.0.0","");
}

/**
Expand Down

0 comments on commit 46731f2

Please sign in to comment.