update ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/session/OnlineSessionFactory.java.

ServletUtils.getRequest()应改request,可能为空

Signed-off-by: chenjh <asgard2023@outlook.com>
pull/420/head
chenjh 2 years ago committed by Gitee
parent 6253e41658
commit c719be609a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -28,7 +28,7 @@ public class OnlineSessionFactory implements SessionFactory
HttpServletRequest request = (HttpServletRequest) sessionContext.getServletRequest();
if (request != null)
{
UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent"));
UserAgent userAgent = UserAgent.parseUserAgentString(request.getHeader("User-Agent"));
// 获取客户端操作系统
String os = userAgent.getOperatingSystem().getName();
// 获取客户端浏览器

Loading…
Cancel
Save