|
|
@ -5,6 +5,7 @@ |
|
|
|
package setting |
|
|
|
package setting |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
|
|
|
|
"net/url" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"path/filepath" |
|
|
|
"path/filepath" |
|
|
|
|
|
|
|
|
|
|
@ -31,10 +32,8 @@ func newPackages() { |
|
|
|
|
|
|
|
|
|
|
|
Packages.Storage = getStorage("packages", "", nil) |
|
|
|
Packages.Storage = getStorage("packages", "", nil) |
|
|
|
|
|
|
|
|
|
|
|
Packages.RegistryHost = Domain |
|
|
|
appURL, _ := url.Parse(AppURL) |
|
|
|
if (Protocol == HTTP && HTTPPort != "80") || (Protocol == HTTPS && HTTPPort != "443") { |
|
|
|
Packages.RegistryHost = appURL.Host |
|
|
|
Packages.RegistryHost += ":" + HTTPPort |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Packages.ChunkedUploadPath = filepath.ToSlash(sec.Key("CHUNKED_UPLOAD_PATH").MustString("tmp/package-upload")) |
|
|
|
Packages.ChunkedUploadPath = filepath.ToSlash(sec.Key("CHUNKED_UPLOAD_PATH").MustString("tmp/package-upload")) |
|
|
|
if !filepath.IsAbs(Packages.ChunkedUploadPath) { |
|
|
|
if !filepath.IsAbs(Packages.ChunkedUploadPath) { |
|
|
|