From d39389670556d41e70bcbf774f7058ce5b0ba104 Mon Sep 17 00:00:00 2001 From: jungeun Date: Mon, 5 Aug 2024 19:21:09 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20cors=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/example/likelion12/config/SecurityConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/likelion12/config/SecurityConfig.java b/src/main/java/com/example/likelion12/config/SecurityConfig.java index 5d64c5c..150bb56 100644 --- a/src/main/java/com/example/likelion12/config/SecurityConfig.java +++ b/src/main/java/com/example/likelion12/config/SecurityConfig.java @@ -41,7 +41,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { @Bean public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); - configuration.setAllowedOrigins(Arrays.asList("http://example.com")); // 허용할 도메인 설정 + configuration.setAllowedOrigins(Arrays.asList("http://localhost:3000")); // 허용할 도메인 설정 configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); // 허용할 HTTP 메서드 설정 configuration.setAllowedHeaders(Arrays.asList("*")); // 허용할 헤더 설정 configuration.setAllowCredentials(true); // 자격 증명 허용 설정