Skip to content

Commit e130051

Browse files
cnlimiterCopilot
andauthored
Update src/core/upload/newapi_upload.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5ab3a28 commit e130051

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/core/upload/newapi_upload.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ def upload_to_newapi(
117117
headers["Content-Type"] = "application/json; charset=utf-8"
118118

119119
logger.info("NEWAPI 上传 URL: %s", url)
120-
logger.info("NEWAPI 请求头: %s", {
121-
**headers,
122-
"Authorization": f"Bearer {_mask_header_value(headers['Authorization'][7:])}",
123-
})
120+
safe_headers = dict(headers)
121+
if "Authorization" in safe_headers:
122+
safe_headers["Authorization"] = "REDACTED"
123+
logger.debug("NEWAPI 请求头: %s", safe_headers)
124124

125125
resp = cffi_requests.post(
126126
url,

0 commit comments

Comments
 (0)