mirror of https://gitgud.io/cncanon/sg-proxy.git
Add some required headers, fixes #4
This commit is contained in:
parent
e66b529d70
commit
a166c4f93d
5
main.js
5
main.js
|
@ -53,7 +53,10 @@ app.post('/v1/complete', async (req, res) => {
|
|||
baseURL: 'https://sourcegraph.com/.api/completions/stream',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `token ${API_TOKEN}`
|
||||
'Authorization': `token ${API_TOKEN}`,
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36',
|
||||
'X-Requested-With': 'Sourcegraph',
|
||||
'X-Sourcegraph-Client': 'https://sourcegraph.com',
|
||||
},
|
||||
responseType: 'stream',
|
||||
timeout: 180000,
|
||||
|
|
Loading…
Reference in New Issue