Browse Source

漏洞修复

zjs 1 month ago
parent
commit
ccfb47cfd0

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/filter/RestCorsFilter.java

@@ -22,7 +22,7 @@ public class RestCorsFilter implements Filter {
22
         HttpServletRequest request = (HttpServletRequest) req;
22
         HttpServletRequest request = (HttpServletRequest) req;
23
         response.setHeader("Access-Control-Allow-Origin", "*"); // 可写成受信任的站点
23
         response.setHeader("Access-Control-Allow-Origin", "*"); // 可写成受信任的站点
24
         response.setHeader("Access-Control-Allow-Credentials","true");
24
         response.setHeader("Access-Control-Allow-Credentials","true");
25
-        response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS");
25
+        response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS ,DELETE,PUT");
26
         response.setHeader("Access-Control-Max-Age", "31536000");
26
         response.setHeader("Access-Control-Max-Age", "31536000");
27
         response.setHeader("Access-Control-Allow-Headers", "*");
27
         response.setHeader("Access-Control-Allow-Headers", "*");
28
         if ("OPTIONS".equalsIgnoreCase(request.getMethod())) {
28
         if ("OPTIONS".equalsIgnoreCase(request.getMethod())) {