mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-01 09:49:03 +08:00
fix: add copilot header to fix json error (#9456)
* add accept type in header * add header
This commit is contained in:
parent
3be7c2e1a8
commit
d6866052c4
@ -68,7 +68,11 @@ class CopilotService {
|
||||
|
||||
constructor() {
|
||||
this.tokenFilePath = path.join(app.getPath('userData'), '.copilot_token')
|
||||
this.headers = { ...CONFIG.DEFAULT_HEADERS }
|
||||
this.headers = {
|
||||
...CONFIG.DEFAULT_HEADERS,
|
||||
accept: 'application/json',
|
||||
'user-agent': 'Visual Studio Code (desktop)'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,6 +97,7 @@ class CopilotService {
|
||||
'Sec-Fetch-Site': 'none',
|
||||
'Sec-Fetch-Mode': 'no-cors',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
accept: 'application/json',
|
||||
authorization: `token ${token}`
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user