From 694593aadd5e4dc350c9b8fb2c4ac8c7c4371c50 Mon Sep 17 00:00:00 2001 From: SR07 Date: Thu, 5 Jun 2025 15:58:39 +0900 Subject: [PATCH] =?UTF-8?q?v1.1=20=EC=88=9C=EC=84=9C=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 4 +++- app/utils/constants.py | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 app/utils/constants.py diff --git a/app/main.py b/app/main.py index 1ed1b54..74e480c 100644 --- a/app/main.py +++ b/app/main.py @@ -51,11 +51,13 @@ async def log_exceptions_middleware(request: Request, call_next): origins = [ "https://sukjenogi.biryu2000.kr", # 프론트 도메인 + "https://sukjenogi.com", # 프론트 도메인 + "https://www.sukjenogi.com", # 프론트 도메인 ] app.add_middleware( CORSMiddleware, - allow_origins=["*"], + allow_origins=origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], diff --git a/app/utils/constants.py b/app/utils/constants.py new file mode 100644 index 0000000..2623684 --- /dev/null +++ b/app/utils/constants.py @@ -0,0 +1,12 @@ +# 서버 ID → 서버명 +SERVER_MAP = { + 1: "아스테르", + 2: "세레브레이", + 3: "쿠아트", + 4: "루나리오", + 5: "알렉시아", + 6: "라사", +} + +# 서버명 → 서버 ID (역방향 매핑) +SERVER_REVERSE_MAP = {v: k for k, v in SERVER_MAP.items()}