mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +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
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -123,7 +123,7 @@ jobs:
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ^1.21.6
|
go-version: ^1.21.6
|
||||||
|
|
||||||
- name: Setup compiler environment
|
- name: Setup compiler environment
|
||||||
id: info
|
id: info
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -288,6 +288,14 @@ func (u *Upgrader) DownloadLatestRelease(progressChan chan float64) (tarName str
|
||||||
return
|
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)
|
resp, err := http.Get(digest.BrowserDownloadUrl)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue