diff --git a/backend/main.py b/backend/main.py index c3f867d..9aa4f10 100644 --- a/backend/main.py +++ b/backend/main.py @@ -101,8 +101,8 @@ def start_scheduler_background(): # Cloud Run 도메인 및 Regex 정의 (환경 무관하게 참조 가능하도록) cloud_origins = [ "https://query-craft-frontend-53ngedkhia-uc.a.run.app", - "https://query-craft-frontend-758178119666.us-central1.run.app", - "https://query-craft-frontend-758178119666.a.run.app", # 추가 + "https://query-craft-frontend-758178119666.us-central1.run.app", # Reported issue origin + "https://query-craft-frontend-758178119666.a.run.app", "https://querycraft.run.app", # 커스텀 도메인 예비 ] # 좀 더 유연한 regex: query-craft-frontend로 시작하는 모든 .run.app 도메인 허용 diff --git a/tests/test_cors_config.py b/tests/test_cors_config.py index 9a0f7c8..ac6f7eb 100644 --- a/tests/test_cors_config.py +++ b/tests/test_cors_config.py @@ -5,7 +5,9 @@ from fastapi.testclient import TestClient # Set ENV to production before importing backend.main to ensure production CORS settings are used +# Also set POSTGRES_DSN to a dummy value to pass the production config check os.environ["ENV"] = "production" +os.environ["POSTGRES_DSN"] = "postgresql://user:pass@localhost:5432/db" try: from backend.main import app