feat(usage-script): add User-Agent header to New API template

Align the New API usage query template with the GENERAL template by
including "User-Agent: cc-switch/1.0" in its request headers, so
cc-switch requests are identifiable in provider server logs and less
likely to be blocked by UA-based rate limiting on some New API
deployments.
This commit is contained in:
Jason
2026-04-16 23:55:09 +08:00
parent 8b65a31c7c
commit 50431b7ec9
+1
View File
@@ -73,6 +73,7 @@ const generatePresetTemplates = (
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer {{accessToken}}",
"User-Agent": "cc-switch/1.0",
"New-Api-User": "{{userId}}"
},
},