From f452bab4b5626505502ce45a3e74b820024966b5 Mon Sep 17 00:00:00 2001 From: RyuTaeUung Date: Fri, 25 Oct 2024 10:50:47 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20cors=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dnd/jjakkak/global/config/security/SecurityConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/dnd/jjakkak/global/config/security/SecurityConfig.java b/src/main/java/com/dnd/jjakkak/global/config/security/SecurityConfig.java index 085ecb3..0c3ef7f 100644 --- a/src/main/java/com/dnd/jjakkak/global/config/security/SecurityConfig.java +++ b/src/main/java/com/dnd/jjakkak/global/config/security/SecurityConfig.java @@ -110,7 +110,7 @@ SecurityFilterChain filterChain(HttpSecurity http) throws Exception { @Bean protected CorsConfigurationSource corsConfigurationSource() { // 추후 CORS 수정 필요 CorsConfiguration config = new CorsConfiguration(); - config.setAllowedOrigins(List.of(jjakkakProperties.getFrontUrl(), "http://localhost:5173")); // 허용할 도메인 명시 + config.setAllowedOrigins(List.of(jjakkakProperties.getFrontUrl(), "http://localhost:5173", "http://jjakkak.com", "https://jjakkak.com")); // 허용할 도메인 명시 config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")); config.setAllowedHeaders(List.of("Authorization", "Content-Type", "Access-Control-Allow-Headers", "Access-Control-Expose-Headers", "_retry"));