123
This commit is contained in:
@@ -2,6 +2,7 @@ package com.ruoyi.common.utils;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import cn.hutool.http.Header;
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import lombok.AccessLevel;
|
||||
@@ -35,6 +36,7 @@ import java.util.UUID;
|
||||
public class ServletUtils extends ServletUtil {
|
||||
|
||||
private final static String HEAD_UUID = "uuid";
|
||||
private final static String USER_AGENT = "User-Agent";
|
||||
|
||||
/**
|
||||
* 获取String参数
|
||||
@@ -208,4 +210,7 @@ public class ServletUtils extends ServletUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getUserAgent() {
|
||||
return getRequest().getHeader(USER_AGENT);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user