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 +} diff --git a/src/main/java/com/example/bami/config/WebConfig.java b/src/main/java/com/example/bami/config/WebConfig.java index c57f2b6..e404e26 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, "https://www.bamiweb.com","http://www.bamiweb.com") .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") .allowedHeaders("*") .allowCredentials(true) .maxAge(3600); } -} \ No newline at end of file +}