mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-27 16:26:16 +08:00
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:
@@ -73,6 +73,7 @@ const generatePresetTemplates = (
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer {{accessToken}}",
|
||||
"User-Agent": "cc-switch/1.0",
|
||||
"New-Api-User": "{{userId}}"
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user