Skip to content

Commit

Permalink
downloader: add macaco as user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
shagu committed Sep 5, 2024
1 parent 845ccdc commit e1cbdf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Downloader {
}

return new Promise((resolve, reject) => {
const request = http.get(url, async (response) => {
const request = http.get(url, { headers: { 'User-Agent': 'Macaco [github.com/shagu/macaco]' } } ,async (response) => {
// handle non-200 http status codes
if (response.statusCode === 301 || response.statusCode === 302) {
info.redirect = response.headers.location
Expand Down

0 comments on commit e1cbdf1

Please sign in to comment.