diff options
Diffstat (limited to 'handler.go')
-rw-r--r-- | handler.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -53,7 +53,11 @@ type packageHandler struct { } func (h packageHandler) Handle(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - canonicalURL := fmt.Sprintf("%s/%s", h.config.URL, h.pkgName) + baseURL := h.config.URL + if h.pkg.URL != "" { + baseURL = h.pkg.URL + } + canonicalURL := fmt.Sprintf("%s/%s", baseURL, h.pkgName) data := struct { Repo string Branch string |