fix: HTTPS 프록시 뒤 CORS 오류 해결 (forward-headers + 운영 오리진 허용)
CI / build (push) Failing after 11m38s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-05-31 20:49:49 +09:00
parent 2ecdd363b1
commit f55d998803
2 changed files with 8 additions and 4 deletions
@@ -21,7 +21,9 @@ public class CorsConfig implements WebMvcConfigurer {
"http://localhost:5173", // Vue 개발 서버
"capacitor://localhost", // Capacitor (iOS scheme)
"https://localhost", // Capacitor Android (기본 https scheme)
"http://localhost" // Capacitor Android (http scheme)
"http://localhost", // Capacitor Android (http scheme)
"https://app.sblog.kr", // 운영 웹 (안전망)
"http://app.sblog.kr"
)
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")
.allowedHeaders("*")
+2
View File
@@ -2,6 +2,8 @@ server:
port: 8080
servlet:
context-path: /
# Nginx(HTTPS) 리버스 프록시 뒤 — X-Forwarded-* 를 신뢰해 원래 스킴/호스트 인식 (CORS·리다이렉트 정확)
forward-headers-strategy: framework
spring:
# 로컬 개발 시 .env(properties 형식, git 미추적)에서 환경변수 로드. 없으면 OS/컨테이너 환경변수 사용.