mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-05-31 21:21:30 +08:00
Update src/core/upload/newapi_upload.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -117,10 +117,10 @@ def upload_to_newapi(
|
|||||||
headers["Content-Type"] = "application/json; charset=utf-8"
|
headers["Content-Type"] = "application/json; charset=utf-8"
|
||||||
|
|
||||||
logger.info("NEWAPI 上传 URL: %s", url)
|
logger.info("NEWAPI 上传 URL: %s", url)
|
||||||
logger.info("NEWAPI 请求头: %s", {
|
safe_headers = dict(headers)
|
||||||
**headers,
|
if "Authorization" in safe_headers:
|
||||||
"Authorization": f"Bearer {_mask_header_value(headers['Authorization'][7:])}",
|
safe_headers["Authorization"] = "REDACTED"
|
||||||
})
|
logger.debug("NEWAPI 请求头: %s", safe_headers)
|
||||||
|
|
||||||
resp = cffi_requests.post(
|
resp = cffi_requests.post(
|
||||||
url,
|
url,
|
||||||
|
|||||||
Reference in New Issue
Block a user