Commit 127cd122 by 袁伟铭

1.0.0

parent da7b70a6
......@@ -61,7 +61,7 @@ public class HttpRequestUtils {
"REMOTE_ADDR",
"X-Real-IP"};
private static final UserAgentAnalyzer userAgentAnalyzer = UserAgentAnalyzer
private static final UserAgentAnalyzer USER_AGENT_ANALYZER = UserAgentAnalyzer
.newBuilder()
.hideMatcherLoadStats()
.withCache(10000)
......@@ -283,7 +283,7 @@ public class HttpRequestUtils {
* @return
*/
public static String getBrowser(HttpServletRequest request) {
UserAgent.ImmutableUserAgent userAgent = userAgentAnalyzer.parse(request.getHeader("User-Agent"));
UserAgent.ImmutableUserAgent userAgent = USER_AGENT_ANALYZER.parse(request.getHeader("User-Agent"));
return userAgent.get(UserAgent.AGENT_NAME_VERSION).getValue();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment