From 64a68f117657d4822fe6d1622bfb84736b325dbb Mon Sep 17 00:00:00 2001 From: lc631017672 <631017672@qq.com> Date: Mon, 7 Jul 2025 10:27:48 +0800 Subject: [PATCH] refactor: Remove debug logging for security checks --- app/core/security.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/core/security.py b/app/core/security.py index 77b1e27..eebad69 100644 --- a/app/core/security.py +++ b/app/core/security.py @@ -80,12 +80,10 @@ class SecurityService: # 否则检查请求头中的x-goog-api-key if not x_goog_api_key: - logger.debug(f"Failed auth attempt: key='{key}', x_goog_api_key=None") logger.error("Invalid key and missing x-goog-api-key header") raise HTTPException(status_code=401, detail="Invalid key and missing x-goog-api-key header") if x_goog_api_key not in settings.ALLOWED_TOKENS and x_goog_api_key != settings.AUTH_TOKEN: - logger.debug(f"Failed auth attempt: key='{key}', x_goog_api_key='{x_goog_api_key}'") logger.error("Invalid key and invalid x-goog-api-key") raise HTTPException(status_code=401, detail="Invalid key and invalid x-goog-api-key")