diff --git a/src/main/java/com/committers/snowflowerthon/committersserver/auth/config/SecurityConfig.java b/src/main/java/com/committers/snowflowerthon/committersserver/auth/config/SecurityConfig.java index 9725a5f..c8a7b9d 100644 --- a/src/main/java/com/committers/snowflowerthon/committersserver/auth/config/SecurityConfig.java +++ b/src/main/java/com/committers/snowflowerthon/committersserver/auth/config/SecurityConfig.java @@ -90,12 +90,12 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { ) // OAuth 2.0 로그인 설정 시작 .oauth2Login( (oauth2Login) -> oauth2Login - .authorizationEndpoint(authorization -> authorization // 인증 엔드포인트 설정 - .baseUri("/login/oauth2/code") // 사용자가 로그인하려고 할 때 리다이렉션되는 기본 URI - - ) // 커스텀 로그인 페이지가 필요하지 않으므로, 로그인 시 리다이렉션이 필요없다. +// .authorizationEndpoint(authorization -> authorization // 인증 엔드포인트 설정 +//// .baseUri("/login/oauth2/code") // 사용자가 로그인하려고 할 때 리다이렉션되는 기본 URI +//// +//// ) // 커스텀 로그인 페이지가 필요하지 않으므로, 로그인 시 리다이렉션이 필요없다. .redirectionEndpoint( redirection -> redirection - .baseUri("/login/oauth2/code") // OAuth 2.0 공급자로부터 코드가 리다이렉션될 때의 기본 URI + .baseUri("/login/oauth2/code/github") // OAuth 2.0 공급자로부터 코드가 리다이렉션될 때의 기본 URI // ) // 리다이렉션 엔드포인트 설정 .successHandler(successHandler) // OAuth 2.0 로그인 성공 시의 핸들러를 설정 diff --git a/src/main/java/com/committers/snowflowerthon/committersserver/domain/attack/controller/AttackController.java b/src/main/java/com/committers/snowflowerthon/committersserver/domain/attack/controller/AttackController.java index 1ba6d37..ec4cb05 100644 --- a/src/main/java/com/committers/snowflowerthon/committersserver/domain/attack/controller/AttackController.java +++ b/src/main/java/com/committers/snowflowerthon/committersserver/domain/attack/controller/AttackController.java @@ -11,6 +11,7 @@ @RestController @RequiredArgsConstructor +@CrossOrigin(origins = "https://kidari.site") @RequestMapping("/api/v1") public class AttackController { diff --git a/src/main/java/com/committers/snowflowerthon/committersserver/domain/follow/controller/FollowController.java b/src/main/java/com/committers/snowflowerthon/committersserver/domain/follow/controller/FollowController.java index 0e7bacb..b414277 100644 --- a/src/main/java/com/committers/snowflowerthon/committersserver/domain/follow/controller/FollowController.java +++ b/src/main/java/com/committers/snowflowerthon/committersserver/domain/follow/controller/FollowController.java @@ -8,6 +8,7 @@ @RestController @RequiredArgsConstructor +@CrossOrigin(origins = "https://kidari.site") @RequestMapping("/api/v1") public class FollowController { private final FollowService followService; diff --git a/src/main/java/com/committers/snowflowerthon/committersserver/domain/item/controller/ItemController.java b/src/main/java/com/committers/snowflowerthon/committersserver/domain/item/controller/ItemController.java index ec96592..866b966 100644 --- a/src/main/java/com/committers/snowflowerthon/committersserver/domain/item/controller/ItemController.java +++ b/src/main/java/com/committers/snowflowerthon/committersserver/domain/item/controller/ItemController.java @@ -8,6 +8,7 @@ @RestController @RequiredArgsConstructor +@CrossOrigin(origins = "https://kidari.site") @RequestMapping("/api/v1/item") public class ItemController { diff --git a/src/main/java/com/committers/snowflowerthon/committersserver/domain/member/controller/MemberController.java b/src/main/java/com/committers/snowflowerthon/committersserver/domain/member/controller/MemberController.java index bb57ff7..c452465 100644 --- a/src/main/java/com/committers/snowflowerthon/committersserver/domain/member/controller/MemberController.java +++ b/src/main/java/com/committers/snowflowerthon/committersserver/domain/member/controller/MemberController.java @@ -11,6 +11,7 @@ @RequiredArgsConstructor @RestController +@CrossOrigin(origins = "https://kidari.site") @RequestMapping("/api/v1") public class MemberController {