1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 15:25:48 +01:00

Use url.JoinPath in webserver.

This commit is contained in:
Juliusz Chroboczek 2023-12-09 17:40:04 +01:00
parent 1c042b55af
commit bee1c3d0c3

View file

@ -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 {