From 25a221e3c52f2ca6d2eefbf245097b5ddd7fe4dd Mon Sep 17 00:00:00 2001 From: bbbang105 <2018111366@dgu.ac.kr> Date: Sun, 29 Sep 2024 18:54:51 +0900 Subject: [PATCH] =?UTF-8?q?#39=20[chore]=20:=20=ED=97=88=EC=9A=A9=20Orgin?= =?UTF-8?q?=EC=9D=84=20=EC=A7=80=EC=A0=95=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/side/onetime/global/config/SecurityConfig.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/side/onetime/global/config/SecurityConfig.java b/src/main/java/side/onetime/global/config/SecurityConfig.java index 0b2ac6d..e3cc8b9 100644 --- a/src/main/java/side/onetime/global/config/SecurityConfig.java +++ b/src/main/java/side/onetime/global/config/SecurityConfig.java @@ -14,6 +14,7 @@ import side.onetime.auth.handler.OAuthLoginSuccessHandler; import java.util.Collections; +import java.util.List; @RequiredArgsConstructor @Configuration @@ -28,7 +29,11 @@ CorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration(); config.setAllowedHeaders(Collections.singletonList("*")); config.setAllowedMethods(Collections.singletonList("*")); - config.setAllowedOriginPatterns(Collections.singletonList("*")); // 허용할 origin + config.setAllowedOrigins(List.of( + "http://localhost:5173", + "https://onetime-test.vercel.app", + "https://onetime-with-members.com" + )); config.setAllowCredentials(true); return config; };