운영환경처리

This commit is contained in:
2026-03-10 15:00:31 +09:00
parent 0ff38b24d4
commit 8d83505ee7

View File

@@ -26,8 +26,6 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
@EnableWebSecurity
public class SecurityConfig {
@Value("${cors.allowed-origins}")
private List<String> allowedOrigins;
@Bean
public SecurityFilterChain securityFilterChain(
@@ -114,7 +112,7 @@ public class SecurityConfig {
CorsConfiguration config = new CorsConfiguration(); // CORS 객체 생성
// application.yml에서 환경별로 설정된 도메인 사용
config.setAllowedOriginPatterns(allowedOrigins);
config.setAllowedOriginPatterns(List.of("*")); // 도메인 허용
config.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"));
config.setAllowedHeaders(List.of("*")); // 헤더요청 Authorization, Content-Type, X-Custom-Header