edit : api key 파일로 관리
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user