feat(file-check): 更新文件检核工具 API Key 配置及相关文档

This commit is contained in:
hugo committed 2026-06-17 22:29:15 +08:00
1 parent 634dee4b81
commit 55cf7ff734
74 files changed
+1525 -1182

No files matched your search

+3 -3
View File
@@ -33,7 +33,7 @@ _TASK_LOCK_KEY_BASE = 8700000000
def _tool_token_secret() -> str:
return str(
current_app.config.get("FILE_CHECK_TOOLS_API_KEY")
current_app.config.get("FILE_CHECK_TOOL_API_KEY")
or current_app.config.get("INTEGRATION_API_KEY")
or current_app.config.get("SECRET_KEY")
or "default-secret"
@@ -56,13 +56,13 @@ def _decode_download_token(token: str | None) -> dict | None:
def _require_tool_auth() -> None:
configured = str(
current_app.config.get("FILE_CHECK_TOOLS_API_KEY")
current_app.config.get("FILE_CHECK_TOOL_API_KEY")
or current_app.config.get("INTEGRATION_API_KEY")
or ""
).strip()
if not configured:
raise ServiceUnavailableError(
"FILE_CHECK_TOOLS_API_KEY or INTEGRATION_API_KEY is not configured",
"FILE_CHECK_TOOL_API_KEY or INTEGRATION_API_KEY is not configured",
code="missing_auth",
)