edit : api key 파일로 관리

This commit is contained in:
2025-12-19 15:32:05 +09:00
parent 7eed2e9868
commit 113626cc5d
7 changed files with 58 additions and 6 deletions

View File

@@ -34,7 +34,6 @@ from custom_logger.main_log import main_logger as LOG
API_KEY_HEADER = APIKeyHeader(name='Authorization', auto_error=False)
@asynccontextmanager
async def lifespan(app: FastAPI):
# When service starts.
@@ -42,6 +41,10 @@ async def lifespan(app: FastAPI):
import os
import const
from const import API_KEY_MANAGER
API_KEY_MANAGER.set_api_key()
if os.path.exists(const.TEMP_FOLDER):
for _file in os.scandir(const.TEMP_FOLDER):
os.remove(_file)