Explorar o código

更新 'ruoyi-common/src/main/java/com/ruoyi/common/filter/RestCorsFilter.java'

wangyu hai 1 semana
pai
achega
243cdf8143

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

@@ -46,7 +46,7 @@ public class RestCorsFilter implements Filter {
46 46
         if (allowedOrigins.contains(originHeader)) {
47 47
             response.setHeader("Access-Control-Allow-Origin", originHeader);
48 48
             response.setHeader("Access-Control-Allow-Credentials", "true");
49
-            response.setHeader("Access-Control-Allow-Methods", "POST, GET, DELETE, PUT");
49
+            response.setHeader("Access-Control-Allow-Methods", "POST,GET,DELETE,PUT,OPTIONS");
50 50
             response.setHeader("Access-Control-Max-Age", "31536000");
51 51
             response.setHeader("Access-Control-Allow-Headers", "*");
52 52
             response.setStatus(HttpServletResponse.SC_OK);