From f3b0a041d6caf38940582134c5a51c2f969e7086 Mon Sep 17 00:00:00 2001 From: Yoojung Choi <101849662+eqvyoo@users.noreply.github.com> Date: Thu, 12 Sep 2024 15:36:08 +0900 Subject: [PATCH 1/3] Update WebConfig.java --- src/main/java/com/example/bami/config/WebConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/bami/config/WebConfig.java b/src/main/java/com/example/bami/config/WebConfig.java index c57f2b6..20bda19 100644 --- a/src/main/java/com/example/bami/config/WebConfig.java +++ b/src/main/java/com/example/bami/config/WebConfig.java @@ -14,10 +14,10 @@ public class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") // 모든 API 경로에 대해 CORS 설정 - .allowedOrigins(allowedOrigin) + .allowedOrigins(allowedOrigin, "http://bami-alb-1251243439.ap-northeast-2.elb.amazonaws.com","https://www.bamiweb.com") .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") .allowedHeaders("*") .allowCredentials(true) .maxAge(3600); } -} \ No newline at end of file +} From 5bfb4d3591a4bb16c3c9dc55f9556948496cd369 Mon Sep 17 00:00:00 2001 From: Yoojung Choi <101849662+eqvyoo@users.noreply.github.com> Date: Tue, 17 Sep 2024 02:25:35 +0900 Subject: [PATCH 2/3] Update WebConfig.java --- src/main/java/com/example/bami/config/WebConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/example/bami/config/WebConfig.java b/src/main/java/com/example/bami/config/WebConfig.java index 20bda19..e404e26 100644 --- a/src/main/java/com/example/bami/config/WebConfig.java +++ b/src/main/java/com/example/bami/config/WebConfig.java @@ -14,7 +14,7 @@ public class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") // 모든 API 경로에 대해 CORS 설정 - .allowedOrigins(allowedOrigin, "http://bami-alb-1251243439.ap-northeast-2.elb.amazonaws.com","https://www.bamiweb.com") + .allowedOrigins(allowedOrigin, "https://www.bamiweb.com","http://www.bamiweb.com") .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") .allowedHeaders("*") .allowCredentials(true) From 893b952f4cfd50c4e8e502995b40fb9cf5fb7c50 Mon Sep 17 00:00:00 2001 From: Yoojung Choi <101849662+eqvyoo@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:41:29 +0900 Subject: [PATCH 3/3] Update SecurityConfig.java --- src/main/java/com/example/bami/config/SecurityConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/bami/config/SecurityConfig.java b/src/main/java/com/example/bami/config/SecurityConfig.java index c6a4483..6e0105a 100644 --- a/src/main/java/com/example/bami/config/SecurityConfig.java +++ b/src/main/java/com/example/bami/config/SecurityConfig.java @@ -29,6 +29,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .requestMatchers("/ai/**").permitAll() .requestMatchers("/api/**").permitAll() .requestMatchers("/").permitAll() + .requestMatchers("/actuator/health").permitAll() // 헬스 체크 허용 추가 // Swagger 관련 경로들에 대해 접근을 허용합니다. .requestMatchers("/swagger-ui/**", "/v3/api-docs/**").permitAll() .anyRequest().authenticated() // 그 외의 모든 요청은 인증된 사용자만 접근 @@ -40,4 +41,4 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { public JwtAuthenticationFilter jwtAuthenticationFilter() { return new JwtAuthenticationFilter(tokenProvider); } -} \ No newline at end of file +}