github requires user agent header

This commit is contained in:
Lamp 2019-09-05 14:25:39 -07:00 committed by GitHub
parent 3f6e30d2d6
commit 95f5bea88b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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', ()=>{