zendwang
2022-07-04 d1f8b2ed17b5290bc67b5fb757dde1a381a88907
ruoyi-common/src/main/java/com/ruoyi/common/filter/XssFilter.java
@@ -1,5 +1,6 @@
package com.ruoyi.common.filter;
import com.ruoyi.common.enums.HttpMethod;
import com.ruoyi.common.utils.StringUtils;
import javax.servlet.*;
@@ -48,7 +49,7 @@
        String url = request.getServletPath();
        String method = request.getMethod();
        // GET DELETE 不过滤
        if (method == null || method.matches("GET") || method.matches("DELETE")) {
        if (method == null || method.matches(HttpMethod.GET.name()) || method.matches(HttpMethod.DELETE.name())) {
            return true;
        }
        return StringUtils.matches(url, excludes);