Skip to content

Commit

Permalink
Merge pull request #125 from criteo/fix-download-from-github
Browse files Browse the repository at this point in the history
Fix 403 error when downloading from github
  • Loading branch information
gmonceyron authored Sep 8, 2023
2 parents 34cb3eb + 193ef9e commit 661b2d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/helper/file-loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ func DownloadFileFromUrl(url string, dest string, showProgress bool) error {
if err != nil {
return fmt.Errorf("cannot get request from the server (%v)", err)
}
// Fix issues when downloading files from Github, now it requires a User-Agent header
req.HTTPRequest.Header.Set("User-Agent", "Command Launcher")

fmt.Println("Initializing download...")
resp := client.Do(req)
Expand Down

0 comments on commit 661b2d2

Please sign in to comment.