github requires user agent header
This commit is contained in:
parent
3f6e30d2d6
commit
95f5bea88b
3
index.js
3
index.js
@ -50,7 +50,8 @@ app.post("/update", function (req, res, next) {
|
||||
let url = asset.url + "?access_token=" + config.github_pat;
|
||||
console.log("downloading", url);
|
||||
request.get(url, {headers: {
|
||||
Accept: 'application/octet-stream'
|
||||
Accept: 'application/octet-stream',
|
||||
"User-Agent": "Terrium-Release-Distributor"
|
||||
}}) .on('error', error => console.error(error))
|
||||
.pipe(fs.createWriteStream(`${grpath}/${asset.name}`))
|
||||
.on('finish', ()=>{
|
||||
|
Reference in New Issue
Block a user