refactor: MCP 공통 함수/httpx 싱글톤, CORS 수정, ML 이벤트루프 블로킹 해소 (#4~#7)

This commit is contained in:
2026-02-24 18:25:36 +09:00
parent 24f3082693
commit b36b4a381f
6 changed files with 333 additions and 308 deletions

View File

@@ -45,5 +45,14 @@ class Settings:
CHART_DAYS = int(os.getenv("CHART_DAYS", "100"))
JSON_COMPACT = os.getenv("JSON_COMPACT", "false").lower() == "true"
# CORS (이슈 5)
# 서버-서버 통신용: 브라우저 credentials 불필요.
# Docker 환경: MCP_CORS_ORIGINS=http://backend:8000
# 개발 환경: MCP_CORS_ORIGINS=http://localhost:8000,http://127.0.0.1:8000
MCP_CORS_ORIGINS = os.getenv(
"MCP_CORS_ORIGINS",
"http://localhost:8000,http://127.0.0.1:8000,http://backend:8000",
)
settings = Settings()