src/main/java/com/linghu/config/CorsConfig.java
@@ -19,7 +19,6 @@ public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") // 所有路径 .allowedOriginPatterns("*") // 允许所有来源(支持通配符,Spring 5.3+) // .allowedOrigins("http://localhost:3000", "https://yourdomain.com") // 指定来源 .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") // 允许的HTTP方法 .allowedHeaders("*") // 允许所有请求头 .exposedHeaders("Authorization", "Content-Disposition") // 暴露的响应头