From 544e68e96bf8417336acbde654a77a09b3a7f3fd Mon Sep 17 00:00:00 2001 From: JIUNG GU <60885635+JIUNG9@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:36:11 +0900 Subject: [PATCH] add: add the authorization cors --- .../java/com/bit/lot/flower/auth/common/config/WebConfig.java | 1 + .../flower/auth/social/http/feign/OauthFeignClientRequest.java | 1 - src/main/resources/application-local.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bit/lot/flower/auth/common/config/WebConfig.java b/src/main/java/com/bit/lot/flower/auth/common/config/WebConfig.java index d5c0ff85..9b771395 100644 --- a/src/main/java/com/bit/lot/flower/auth/common/config/WebConfig.java +++ b/src/main/java/com/bit/lot/flower/auth/common/config/WebConfig.java @@ -46,6 +46,7 @@ public void addCorsMappings(CorsRegistry registry) { .allowedOrigins("http://localhost:3000") .allowedMethods("GET", "POST", "PUT", "DELETE") .allowedHeaders("*") + .exposedHeaders("Authorization") .allowCredentials(true); } diff --git a/src/main/java/com/bit/lot/flower/auth/social/http/feign/OauthFeignClientRequest.java b/src/main/java/com/bit/lot/flower/auth/social/http/feign/OauthFeignClientRequest.java index c7d488e1..f49976ae 100644 --- a/src/main/java/com/bit/lot/flower/auth/social/http/feign/OauthFeignClientRequest.java +++ b/src/main/java/com/bit/lot/flower/auth/social/http/feign/OauthFeignClientRequest.java @@ -2,7 +2,6 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; @FeignClient(name = "oauth2", url = "https://kauth.kakao.com") diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index c5e49ead..ea2fdf5f 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -72,7 +72,7 @@ system: kakao: logout: - redirect: http://localhost:9000/login + redirect: http://localhost:3000 service: