diff --git a/src/main/java/com/hanaro/hanafun/account/controller/AccountController.java b/src/main/java/com/hanaro/hanafun/account/controller/AccountController.java index 032e367..a491391 100644 --- a/src/main/java/com/hanaro/hanafun/account/controller/AccountController.java +++ b/src/main/java/com/hanaro/hanafun/account/controller/AccountController.java @@ -8,10 +8,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; import org.springframework.security.core.annotation.AuthenticationPrincipal; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -27,7 +24,7 @@ ResponseEntity readAccountList(@AuthenticationPrincipal Long userId return ResponseEntity.ok(new ApiResponse(true, "ok", accountResDtoList)); } - @GetMapping("/pw") + @PostMapping("/pw") ResponseEntity checkAccountPw(@RequestBody PwReqDto pwReqDto){ PwResDto pwResDto = accountService.checkAccountPw(pwReqDto); return ResponseEntity.ok(new ApiResponse(true, "ok", pwResDto)); diff --git a/src/main/java/com/hanaro/hanafun/common/config/SecurityConfig.java b/src/main/java/com/hanaro/hanafun/common/config/SecurityConfig.java index f0f7bfe..d97a5bd 100644 --- a/src/main/java/com/hanaro/hanafun/common/config/SecurityConfig.java +++ b/src/main/java/com/hanaro/hanafun/common/config/SecurityConfig.java @@ -48,7 +48,6 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception, Auth public UrlBasedCorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); - // TODO CORS 설정 변경 필요 config.addAllowedOrigin("http://localhost:3000"); config.addAllowedOrigin("https://hana-fun-fe.vercel.app"); config.addAllowedHeader("*");