From 698ae84adaf1b8d0e8dd61d7279863fe17c1e81d Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期四, 23 一月 2025 14:20:39 +0800
Subject: [PATCH] 1

---
 ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java
index 8003670..7ea9eed 100644
--- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java
+++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java
@@ -2,7 +2,15 @@
 
 import java.io.File;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.server.reactive.ServerHttpRequest;
+import org.springframework.http.server.reactive.ServerHttpResponse;
+import org.springframework.web.cors.CorsUtils;
+import org.springframework.web.server.ServerWebExchange;
+import org.springframework.web.server.WebFilter;
+import org.springframework.web.server.WebFilterChain;
 import org.springframework.web.servlet.config.annotation.CorsRegistry;
 import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@@ -45,6 +53,9 @@
                 // 设置允许跨域请求的域名
                 .allowedOrigins("*")
                 // 设置允许的方法
-                .allowedMethods("GET");
+                .allowedMethods("GET")
+                .allowedMethods("POST")
+                .allowedMethods("DELETE")
+                .allowedMethods("PUT");
     }
 }
\ No newline at end of file

--
Gitblit v1.7.1