fastAPI 관련
# fastAPI
from fastapi import FastAPI, Depends, HTTPException, Request
from fastapi.middleware.cors import CORSMiddleware # CORS 에러 관련 모듈
app = FastAPI(lifespan=lifespan)
# CORS 설정
orgins = ["https://projectdefenso.com", "http://projectdefenso.com", "https://localhost:3033", "http://localhost:3033", "https://dev.projectdefenso.com", "https://localhost:3035", "http://localhost:3035"]
app.add_middleware(
CORSMiddleware,
allow_origins=orgins, # 모든 출처에서의 요청을 허용
allow_credentials=True,
allow_methods=["*"], # 모든 HTTP 메서드를 허용
allow_headers=["*"] # 모든 HTTP 헤더를 허용
)