From b4ce841613df4fd19fe38a0323fa8986a233166d Mon Sep 17 00:00:00 2001 From: "sungjin.choi" Date: Tue, 17 Nov 2026 15:53:01 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EC=9A=B4=EC=98=81=20=EB=8F=84?= =?UTF-8?q?=EB=A9=94=EC=9D=B8(https://new.specialsource.company)=20CORS=20?= =?UTF-8?q?=ED=97=88=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .../java/company/specialsource/config/SecurityConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/company/specialsource/config/SecurityConfig.java b/src/main/java/company/specialsource/config/SecurityConfig.java index db3a0b6..40bcd90 100644 --- a/src/main/java/company/specialsource/config/SecurityConfig.java +++ b/src/main/java/company/specialsource/config/SecurityConfig.java @@ -39,11 +39,12 @@ public class SecurityConfig { return http.build(); } - // 프론트 개발 서버(localhost:3000 등)에서의 호출 허용 + // 프론트 개발 서버(localhost:3000 등)와 운영 도메인에서의 호출 허용 + // (운영은 nginx 경유라 백엔드가 http로 받으므로 https Origin을 다른 출처로 판단함) @Bean public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration(); - config.setAllowedOriginPatterns(List.of("http://localhost:*")); + config.setAllowedOriginPatterns(List.of("http://localhost:*", "https://new.specialsource.company")); config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS")); config.setAllowedHeaders(List.of("*")); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();