mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
fix(upgrader): github proxy for downloading digest
This commit is contained in:
parent
de8d6073a3
commit
1950d9a86a
2 changed files with 9 additions and 1 deletions
|
@ -288,6 +288,14 @@ func (u *Upgrader) DownloadLatestRelease(progressChan chan float64) (tarName str
|
|||
return
|
||||
}
|
||||
|
||||
if settings.ServerSettings.GithubProxy != "" {
|
||||
digest.BrowserDownloadUrl, err = url.JoinPath(settings.ServerSettings.GithubProxy, digest.BrowserDownloadUrl)
|
||||
if err != nil {
|
||||
err = errors.Wrap(err, "service.DownloadLatestRelease url.JoinPath error")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
resp, err := http.Get(digest.BrowserDownloadUrl)
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue