fix: fix app hostname returning port number (#5441)

This commit is contained in:
Dean Sheather
2022-12-16 04:43:00 +10:00
committed by GitHub
parent 44c10bbe3c
commit 787b8b2a51
5 changed files with 57 additions and 17 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ var nonCanonicalHeaders = map[string]string{
func (api *API) appHost(rw http.ResponseWriter, r *http.Request) {
host := api.AppHostname
if api.AccessURL.Port() != "" {
if host != "" && api.AccessURL.Port() != "" {
host += fmt.Sprintf(":%s", api.AccessURL.Port())
}