From a1749c1c211c0ff001ea7b48ba37224ef882fba9 Mon Sep 17 00:00:00 2001 From: kimday0326 Date: Thu, 30 May 2024 14:03:33 +0900 Subject: [PATCH] =?UTF-8?q?!hotfix:=20CORS=20=EC=84=A4=EC=A0=95=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/khu/gitbox/auth/config/WebMvcConfig.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/khu/gitbox/auth/config/WebMvcConfig.java b/src/main/java/com/khu/gitbox/auth/config/WebMvcConfig.java index 4b348b8..4fe1ecc 100644 --- a/src/main/java/com/khu/gitbox/auth/config/WebMvcConfig.java +++ b/src/main/java/com/khu/gitbox/auth/config/WebMvcConfig.java @@ -7,13 +7,16 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +@Slf4j @Configuration @RequiredArgsConstructor public class WebMvcConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { + log.info("CORS 설정 적용"); registry.addMapping("/**") .allowedOrigins(getAllowOrigins()) .allowedHeaders("*") @@ -23,7 +26,9 @@ public void addCorsMappings(CorsRegistry registry) { private String[] getAllowOrigins() { return Arrays.asList( + "http://localhost", "http://localhost:3000", + "http://localhost:1234", "http://localhost:5173", "http://125.250.17.196:1234" ).toArray(String[]::new);