diff --git a/api/src/main/java/com/mm/api/common/swaggerAnnotation/SwaggerResponseDib.java b/api/src/main/java/com/mm/api/common/swaggerAnnotation/SwaggerResponseDib.java index df8f3c1..56c5e0f 100644 --- a/api/src/main/java/com/mm/api/common/swaggerAnnotation/SwaggerResponseDib.java +++ b/api/src/main/java/com/mm/api/common/swaggerAnnotation/SwaggerResponseDib.java @@ -25,7 +25,7 @@ @ApiResponse(responseCode = "404/0004", description = "존재하지 않는 찜하기입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), @ApiResponse(responseCode = "401/0001", description = "리퀘스트 토큰이 만료되었으니 다시 로그인 해주세요.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), @ApiResponse(responseCode = "401/0002", description = "어세스 토큰이 만료되었으니 재발급 해주세요.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse(responseCode = "500", description = "서버 에러 발생"), + @ApiResponse(responseCode = "500", description = "서버 에러 발생", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), }) public @interface SwaggerResponseDib { } diff --git a/api/src/main/java/com/mm/api/config/WebMvcConfig.java b/api/src/main/java/com/mm/api/config/WebMvcConfig.java index 310fa81..6e92813 100644 --- a/api/src/main/java/com/mm/api/config/WebMvcConfig.java +++ b/api/src/main/java/com/mm/api/config/WebMvcConfig.java @@ -1,15 +1,17 @@ package com.mm.api.config; +import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +@Configuration public class WebMvcConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("/**") .allowedHeaders("*") - .allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS") + .allowedMethods("HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS") .allowCredentials(true); } } diff --git a/core/core-security/src/main/java/com/mm/coresecurity/config/WebSecurityConfig.java b/core/core-security/src/main/java/com/mm/coresecurity/config/WebSecurityConfig.java index 993028f..91900d3 100644 --- a/core/core-security/src/main/java/com/mm/coresecurity/config/WebSecurityConfig.java +++ b/core/core-security/src/main/java/com/mm/coresecurity/config/WebSecurityConfig.java @@ -39,7 +39,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti .cors().configurationSource(request -> { CorsConfiguration cors = new CorsConfiguration(); cors.setAllowedOrigins(List.of("*")); - cors.setAllowedMethods(List.of("HEAD", "POST", "GET", "DELETE", "PUT", "OPTIONS")); + cors.setAllowedMethods(List.of("HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")); cors.setAllowedHeaders(List.of("*")); cors.setAllowCredentials(true); return cors;