From 4e361841f8f95c5750b164b831f5abb381c04809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?toni=20=28=EC=9D=B4=EC=86=8C=EC=9D=80=29?= <144209738+saokiritoni@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:33:46 +0900 Subject: [PATCH] =?UTF-8?q?Chore:=20vercel=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EC=A3=BC=EC=86=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/dongguk/osori/config/SecurityConfig.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/dongguk/osori/config/SecurityConfig.java b/src/main/java/dongguk/osori/config/SecurityConfig.java index 51803d9..161ae92 100644 --- a/src/main/java/dongguk/osori/config/SecurityConfig.java +++ b/src/main/java/dongguk/osori/config/SecurityConfig.java @@ -68,13 +68,13 @@ public PasswordEncoder passwordEncoder() { @Bean public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); - configuration.setAllowedOrigins(List.of("http://localhost:3000")); // 정확한 오리진 설정 - configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")); // 허용할 HTTP 메서드 - configuration.setAllowedHeaders(List.of("Authorization", "Cache-Control", "Content-Type")); // 허용할 HTTP 헤더 - configuration.setAllowCredentials(true); // 자격 증명 허용 + configuration.setAllowedOrigins(List.of("http://localhost:3000", "https://2024-2-oss-proj-osori-fe.vercel.app")); + configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")); + configuration.setAllowedHeaders(List.of("Authorization", "Cache-Control", "Content-Type")); + configuration.setAllowCredentials(true); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - source.registerCorsConfiguration("/**", configuration); // 모든 경로에 대해 설정 적용 + source.registerCorsConfiguration("/**", configuration); return source; } }