Преглед на файлове

请求头允许put请求通过

matianxiang преди 3 седмици
родител
ревизия
53c629037f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      eitc-common/src/main/java/com/eitc/common/filter/RestCorsFilter.java

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

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