RuoYi
2022-07-09 3796d770c6514f445312114f57232e23a5686d86
src/main/java/com/ruoyi/common/filter/XssFilter.java
@@ -12,6 +12,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.enums.HttpMethod;
/**
 * 防止XSS攻击的过滤器
@@ -59,7 +60,7 @@
        String url = request.getServletPath();
        String method = request.getMethod();
        // GET DELETE 不过滤
        if (method == null || method.matches("GET") || method.matches("DELETE"))
        if (method == null || HttpMethod.GET.matches(method) || HttpMethod.DELETE.matches(method))
        {
            return true;
        }