Skip to content

Commit

Permalink
Fixed registry host value. (#19363)
Browse files Browse the repository at this point in the history
  • Loading branch information
KN4CK3R committed Apr 10, 2022
1 parent 72479bf commit 6d51b9f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/setting/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package setting

import (
"net/url"
"os"
"path/filepath"

Expand All @@ -31,10 +32,8 @@ func newPackages() {

Packages.Storage = getStorage("packages", "", nil)

Packages.RegistryHost = Domain
if (Protocol == HTTP && HTTPPort != "80") || (Protocol == HTTPS && HTTPPort != "443") {
Packages.RegistryHost += ":" + HTTPPort
}
appURL, _ := url.Parse(AppURL)
Packages.RegistryHost = appURL.Host

Packages.ChunkedUploadPath = filepath.ToSlash(sec.Key("CHUNKED_UPLOAD_PATH").MustString("tmp/package-upload"))
if !filepath.IsAbs(Packages.ChunkedUploadPath) {
Expand Down

0 comments on commit 6d51b9f

Please sign in to comment.