Parcourir la source

AllowedMethods调整

liuchengsen il y a 3 semaines
Parent
commit
5f4b4f5618

+ 1 - 1
backend-java/src/main/java/com/pharmacopoeia/security/SecurityConfig.java

@@ -58,7 +58,7 @@ public class SecurityConfig {
     public CorsConfigurationSource corsConfigSource() {
         var config = new CorsConfiguration();
         config.setAllowedOriginPatterns(List.of("*"));
-        config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS"));
+        config.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"));
         config.setAllowedHeaders(List.of("*"));
         config.setAllowCredentials(true);
         var source = new UrlBasedCorsConfigurationSource();