改造配置文件,去掉敏感信息
This commit is contained in:
@@ -53,6 +53,16 @@ class Settings(BaseSettings):
|
||||
log_format: str = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
||||
log_date_format: str = "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
# API配置
|
||||
_api_authorization_token: str = "" # 内部存储API Authorization Token
|
||||
|
||||
@property
|
||||
def api_authorization_token(self) -> str:
|
||||
"""API Authorization Token - 只在生产环境下返回"""
|
||||
if self.environment.lower() == "production":
|
||||
return self._api_authorization_token
|
||||
return ""
|
||||
|
||||
# 应用配置
|
||||
app_name: str = "AI Talk Callback API"
|
||||
environment: str = "production" # 环境: production, test, development
|
||||
|
||||
Reference in New Issue
Block a user