From bee1c3d0c3bca5ae4db5812e136796e6ed56707e Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 9 Dec 2023 17:40:04 +0100 Subject: [PATCH] Use url.JoinPath in webserver. --- webserver/webserver.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/webserver/webserver.go b/webserver/webserver.go index 4d869c7..377ce4c 100644 --- a/webserver/webserver.go +++ b/webserver/webserver.go @@ -360,16 +360,7 @@ func groupBase(r *http.Request) (string, error) { return "", nil } if conf.ProxyURL != "" { - u, err := url.Parse(conf.ProxyURL) - if err != nil { - return "", err - } - base := url.URL{ - Scheme: u.Scheme, - Host: u.Host, - Path: path.Join(u.Path, "/group/"), - } - return base.String(), nil + return url.JoinPath(conf.ProxyURL, "/group/") } scheme := "https" if r.TLS == nil {